aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorJeremy <j0k3r@users.noreply.github.com>2015-02-10 14:51:32 +0100
committerJeremy <j0k3r@users.noreply.github.com>2015-02-10 14:51:32 +0100
commitf59f45d74093e92656f9717c8c5f4e37c56d2173 (patch)
tree2eaa556977be8c32b7acc175b28cd4b40507446b /src/Wallabag
parent2c0ffcf3972e2f58267b805a26835f452e016761 (diff)
parent017e20895f6d731b2b8fd7cee0cd954eb7e96145 (diff)
downloadwallabag-f59f45d74093e92656f9717c8c5f4e37c56d2173.tar.gz
wallabag-f59f45d74093e92656f9717c8c5f4e37c56d2173.tar.zst
wallabag-f59f45d74093e92656f9717c8c5f4e37c56d2173.zip
Merge pull request #1069 from wallabag/v2-fix-return-entries
GET /api/entries returns object, no more array
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Controller/WallabagRestController.php2
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
index f77a3749..27d11da5 100644
--- a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
@@ -68,7 +68,7 @@ class WallabagRestController extends Controller
68 ->getRepository('WallabagCoreBundle:Entry') 68 ->getRepository('WallabagCoreBundle:Entry')
69 ->findEntries($this->getUser()->getId(), $isArchived, $isStarred, $isDeleted, $sort, $order); 69 ->findEntries($this->getUser()->getId(), $isArchived, $isStarred, $isDeleted, $sort, $order);
70 70
71 if (!is_array($entries)) { 71 if (!($entries)) {
72 throw $this->createNotFoundException(); 72 throw $this->createNotFoundException();
73 } 73 }
74 74
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index 1805cf3f..b6f86707 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -98,7 +98,7 @@ class EntryRepository extends EntityRepository
98 * @param string $sort 98 * @param string $sort
99 * @param string $order 99 * @param string $order
100 * 100 *
101 * @return ArrayCollection 101 * @return array
102 */ 102 */
103 public function findEntries($userId, $isArchived = null, $isStarred = null, $isDeleted = null, $sort = 'created', $order = 'ASC') 103 public function findEntries($userId, $isArchived = null, $isStarred = null, $isDeleted = null, $sort = 'created', $order = 'ASC')
104 { 104 {
@@ -126,6 +126,6 @@ class EntryRepository extends EntityRepository
126 126
127 return $qb 127 return $qb
128 ->getQuery() 128 ->getQuery()
129 ->getResult(Query::HYDRATE_ARRAY); 129 ->getResult();
130 } 130 }
131} 131}