aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorJeremy Benoist <j0k3r@users.noreply.github.com>2016-04-10 15:37:05 +0200
committerJeremy Benoist <j0k3r@users.noreply.github.com>2016-04-10 15:37:05 +0200
commitf642863ff258972df90940a59510d14b6f366883 (patch)
tree7435da10bf8d9f5650f6d08376d18af79f6aee40 /src/Wallabag
parent615fc1d237a5b6f6ee1b9a1f7cea31f0738dae02 (diff)
parent0135c98b2480d4cc643ba39cbc47e747e2c9e1d4 (diff)
downloadwallabag-f642863ff258972df90940a59510d14b6f366883.tar.gz
wallabag-f642863ff258972df90940a59510d14b6f366883.tar.zst
wallabag-f642863ff258972df90940a59510d14b6f366883.zip
Merge pull request #1895 from wallabag/v2-fix-entries-api
All the entries are fetched via GET /api/entries
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/ApiBundle/Controller/WallabagRestController.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
index 744e1a60..da671a61 100644
--- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
@@ -43,8 +43,8 @@ class WallabagRestController extends FOSRestController
43 { 43 {
44 $this->validateAuthentication(); 44 $this->validateAuthentication();
45 45
46 $isArchived = (int) $request->query->get('archive'); 46 $isArchived = (null === $request->query->get('archive')) ? null : (bool) $request->query->get('archive');
47 $isStarred = (int) $request->query->get('starred'); 47 $isStarred = (null === $request->query->get('starred')) ? null : (bool) $request->query->get('starred');
48 $sort = $request->query->get('sort', 'created'); 48 $sort = $request->query->get('sort', 'created');
49 $order = $request->query->get('order', 'desc'); 49 $order = $request->query->get('order', 'desc');
50 $page = (int) $request->query->get('page', 1); 50 $page = (int) $request->query->get('page', 1);
@@ -52,7 +52,7 @@ class WallabagRestController extends FOSRestController
52 52
53 $pager = $this->getDoctrine() 53 $pager = $this->getDoctrine()
54 ->getRepository('WallabagCoreBundle:Entry') 54 ->getRepository('WallabagCoreBundle:Entry')
55 ->findEntries($this->getUser()->getId(), (bool) $isArchived, (bool) $isStarred, $sort, $order); 55 ->findEntries($this->getUser()->getId(), $isArchived, $isStarred, $sort, $order);
56 56
57 $pager->setCurrentPage($page); 57 $pager->setCurrentPage($page);
58 $pager->setMaxPerPage($perPage); 58 $pager->setMaxPerPage($perPage);