aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller
diff options
context:
space:
mode:
authorNicolas Lœuillet <nicolas@loeuillet.org>2015-02-04 18:12:13 +0100
committerNicolas Lœuillet <nicolas@loeuillet.org>2015-02-04 18:12:13 +0100
commit6079aaa33dc78772e497725d7247c371b80b5578 (patch)
treeeed33e91176768d7c858bb83e23fde6ea4475da5 /src/Wallabag/CoreBundle/Controller
parent6e334aba689f891a229c8a57f908f10dad5b3759 (diff)
downloadwallabag-6079aaa33dc78772e497725d7247c371b80b5578.tar.gz
wallabag-6079aaa33dc78772e497725d7247c371b80b5578.tar.zst
wallabag-6079aaa33dc78772e497725d7247c371b80b5578.zip
change delete status for GET /api/entries method
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller')
-rw-r--r--src/Wallabag/CoreBundle/Controller/WallabagRestController.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
index 5f56e0fc..55906ce0 100644
--- a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
@@ -17,8 +17,8 @@ class WallabagRestController extends Controller
17 * 17 *
18 * @ApiDoc( 18 * @ApiDoc(
19 * parameters={ 19 * parameters={
20 * {"name"="archive", "dataType"="integer", "required"=false, "format"="'0' or '1', default '0'", "description"="filter by archived status."}, 20 * {"name"="archive", "dataType"="integer", "required"=false, "format"="'0' or '1', all entries by default", "description"="filter by archived status."},
21 * {"name"="star", "dataType"="integer", "required"=false, "format"="'0' or '1', default '0'", "description"="filter by starred status."}, 21 * {"name"="star", "dataType"="integer", "required"=false, "format"="'0' or '1', all entries by default", "description"="filter by starred status."},
22 * {"name"="delete", "dataType"="integer", "required"=false, "format"="'0' or '1', default '0'", "description"="filter by deleted status."}, 22 * {"name"="delete", "dataType"="integer", "required"=false, "format"="'0' or '1', default '0'", "description"="filter by deleted status."},
23 * {"name"="sort", "dataType"="string", "required"=false, "format"="'created' or 'updated', default 'created'", "description"="sort entries by date."}, 23 * {"name"="sort", "dataType"="string", "required"=false, "format"="'created' or 'updated', default 'created'", "description"="sort entries by date."},
24 * {"name"="order", "dataType"="string", "required"=false, "format"="'asc' or 'desc', default 'desc'", "description"="order of sort."}, 24 * {"name"="order", "dataType"="string", "required"=false, "format"="'asc' or 'desc', default 'desc'", "description"="order of sort."},
@@ -31,11 +31,9 @@ class WallabagRestController extends Controller
31 */ 31 */
32 public function getEntriesAction(Request $request) 32 public function getEntriesAction(Request $request)
33 { 33 {
34 // TODO isArchived, isStarred et isDeleted ne doivent pas avoir de valeur par défaut
35 // TODO Si on ne passe rien, on ne filtre pas sur le statut.
36 $isArchived = $request->query->get('archive'); 34 $isArchived = $request->query->get('archive');
37 $isStarred = $request->query->get('star'); 35 $isStarred = $request->query->get('star');
38 $isDeleted = $request->query->get('delete'); 36 $isDeleted = $request->query->get('delete', 0);
39 $sort = $request->query->get('sort', 'created'); 37 $sort = $request->query->get('sort', 'created');
40 $order = $request->query->get('order', 'desc'); 38 $order = $request->query->get('order', 'desc');
41 $page = $request->query->get('page', 1); 39 $page = $request->query->get('page', 1);