diff --git a/app/controllers/api.php b/app/controllers/api.php index 6ca856c..3b6f714 100644 --- a/app/controllers/api.php +++ b/app/controllers/api.php @@ -27,4 +27,12 @@ $api->post('/entries', function (Request $request) use ($app) { return $app->json($entry, 201); }); +$api->get('/get', function (Request $request) use ($app) { + $id = $request->request->get('id'); + + $entry = $app['entry_api']->getEntryById($id); + + return $app->json($entry, 201); +}); + return $api;