1
0
mirror of https://github.com/moparisthebest/wallabag synced 2025-01-05 10:48:06 -05:00

Use built-in json renderer

This commit is contained in:
Vincent Jousse 2013-11-22 22:48:06 +01:00
parent a43675b7c7
commit 723fce50b6

View File

@ -6,7 +6,7 @@ $api->get('/', function () { return 'API home page'; });
$api->get('/entries', function () use ($app) { $api->get('/entries', function () use ($app) {
$entries = $app['entry_api']->getEntries(); $entries = $app['entry_api']->getEntries();
return json_encode($entries); return $app->json($entry, 200);
}); });
return $api; return $api;