aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/ApiBundle/Controller')
-rw-r--r--src/Wallabag/ApiBundle/Controller/WallabagRestController.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
index 692a4ae0..02a6de64 100644
--- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
@@ -84,12 +84,12 @@ class WallabagRestController extends Controller
84 public function getEntriesAction(Request $request) 84 public function getEntriesAction(Request $request)
85 { 85 {
86 $isArchived = $request->query->get('archive'); 86 $isArchived = $request->query->get('archive');
87 $isStarred = $request->query->get('star'); 87 $isStarred = $request->query->get('star');
88 $sort = $request->query->get('sort', 'created'); 88 $sort = $request->query->get('sort', 'created');
89 $order = $request->query->get('order', 'desc'); 89 $order = $request->query->get('order', 'desc');
90 $page = (int) $request->query->get('page', 1); 90 $page = (int) $request->query->get('page', 1);
91 $perPage = (int) $request->query->get('perPage', 30); 91 $perPage = (int) $request->query->get('perPage', 30);
92 $tags = $request->query->get('tags', []); 92 $tags = $request->query->get('tags', []);
93 93
94 $pager = $this 94 $pager = $this
95 ->getDoctrine() 95 ->getDoctrine()
@@ -99,7 +99,7 @@ class WallabagRestController extends Controller
99 $pager->setCurrentPage($page); 99 $pager->setCurrentPage($page);
100 $pager->setMaxPerPage($perPage); 100 $pager->setMaxPerPage($perPage);
101 101
102 $pagerfantaFactory = new PagerfantaFactory('page', 'perPage'); 102 $pagerfantaFactory = new PagerfantaFactory('page', 'perPage');
103 $paginatedCollection = $pagerfantaFactory->createRepresentation( 103 $paginatedCollection = $pagerfantaFactory->createRepresentation(
104 $pager, 104 $pager,
105 new Route('api_get_entries', [], $absolute = true) 105 new Route('api_get_entries', [], $absolute = true)
@@ -188,9 +188,9 @@ class WallabagRestController extends Controller
188 { 188 {
189 $this->validateUserAccess($entry->getUser()->getId(), $this->getUser()->getId()); 189 $this->validateUserAccess($entry->getUser()->getId(), $this->getUser()->getId());
190 190
191 $title = $request->request->get('title'); 191 $title = $request->request->get('title');
192 $isArchived = $request->request->get('is_archived'); 192 $isArchived = $request->request->get('is_archived');
193 $isStarred = $request->request->get('is_starred'); 193 $isStarred = $request->request->get('is_starred');
194 194
195 if (!is_null($title)) { 195 if (!is_null($title)) {
196 $entry->setTitle($title); 196 $entry->setTitle($title);