mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-29 02:50:29 +00:00
All the entries are fetched via GET /api/entries
Fix #1863: only the unread entries were fetched with GET /api/entries entrypoint. Now, all the entries are fetched
This commit is contained in:
parent
015e4284f0
commit
5c3ca4fe9e
1 changed files with 3 additions and 3 deletions
|
@ -43,8 +43,8 @@ class WallabagRestController extends FOSRestController
|
|||
{
|
||||
$this->validateAuthentication();
|
||||
|
||||
$isArchived = (int) $request->query->get('archive');
|
||||
$isStarred = (int) $request->query->get('starred');
|
||||
$isArchived = (null === $request->query->get('archive')) ? null : (bool) (int) $request->query->get('archive');
|
||||
$isStarred = (null === $request->query->get('starred')) ? null : (bool) (int) $request->query->get('starred');
|
||||
$sort = $request->query->get('sort', 'created');
|
||||
$order = $request->query->get('order', 'desc');
|
||||
$page = (int) $request->query->get('page', 1);
|
||||
|
@ -52,7 +52,7 @@ class WallabagRestController extends FOSRestController
|
|||
|
||||
$pager = $this->getDoctrine()
|
||||
->getRepository('WallabagCoreBundle:Entry')
|
||||
->findEntries($this->getUser()->getId(), (bool) $isArchived, (bool) $isStarred, $sort, $order);
|
||||
->findEntries($this->getUser()->getId(), $isArchived, $isStarred, $sort, $order);
|
||||
|
||||
$pager->setCurrentPage($page);
|
||||
$pager->setMaxPerPage($perPage);
|
||||
|
|
Loading…
Reference in a new issue