aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-09 22:40:20 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-09 22:40:20 +0100
commitd29bfaf139975fae71b73ebb316da4ce2205fc92 (patch)
tree10970e77e8478b90fe8d0c55f06d90d4443b8a91 /src/Wallabag/CoreBundle/Controller/WallabagRestController.php
parent2a94b1d1b74b4e776e76a522621b67b45d115fe7 (diff)
downloadwallabag-d29bfaf139975fae71b73ebb316da4ce2205fc92.tar.gz
wallabag-d29bfaf139975fae71b73ebb316da4ce2205fc92.tar.zst
wallabag-d29bfaf139975fae71b73ebb316da4ce2205fc92.zip
fix return on API call and fix id in clear for user
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/WallabagRestController.php')
-rw-r--r--src/Wallabag/CoreBundle/Controller/WallabagRestController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
index 1df18247..75e5204e 100644
--- a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
@@ -43,7 +43,7 @@ class WallabagRestController extends Controller
43 $entries = $this 43 $entries = $this
44 ->getDoctrine() 44 ->getDoctrine()
45 ->getRepository('WallabagCoreBundle:Entry') 45 ->getRepository('WallabagCoreBundle:Entry')
46 ->findEntries(1, $isArchived, $isStarred, $isDeleted, $sort, $order); 46 ->findEntries($this->getUser()->getId(), $isArchived, $isStarred, $isDeleted, $sort, $order);
47 47
48 if (!is_array($entries)) { 48 if (!is_array($entries)) {
49 throw $this->createNotFoundException(); 49 throw $this->createNotFoundException();
@@ -86,7 +86,7 @@ class WallabagRestController extends Controller
86 86
87 $content = Extractor::extract($url); 87 $content = Extractor::extract($url);
88 $entry = new Entry(); 88 $entry = new Entry();
89 $entry->setUserId(1); 89 $entry->setUserId($this->getUser()->getId());
90 $entry->setUrl($url); 90 $entry->setUrl($url);
91 $entry->setTitle($request->request->get('title') ?: $content->getTitle()); 91 $entry->setTitle($request->request->get('title') ?: $content->getTitle());
92 $entry->setContent($content->getBody()); 92 $entry->setContent($content->getBody());