diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/WallabagRestController.php | 4 |
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()); |