1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-10 18:51:02 +00:00

fix return on API call and fix id in clear for user

This commit is contained in:
Nicolas Lœuillet 2015-02-09 22:40:20 +01:00
parent 2a94b1d1b7
commit d29bfaf139
2 changed files with 4 additions and 7 deletions

View file

@ -43,7 +43,7 @@ class WallabagRestController extends Controller
$entries = $this
->getDoctrine()
->getRepository('WallabagCoreBundle:Entry')
->findEntries(1, $isArchived, $isStarred, $isDeleted, $sort, $order);
->findEntries($this->getUser()->getId(), $isArchived, $isStarred, $isDeleted, $sort, $order);
if (!is_array($entries)) {
throw $this->createNotFoundException();
@ -86,7 +86,7 @@ class WallabagRestController extends Controller
$content = Extractor::extract($url);
$entry = new Entry();
$entry->setUserId(1);
$entry->setUserId($this->getUser()->getId());
$entry->setUrl($url);
$entry->setTitle($request->request->get('title') ?: $content->getTitle());
$entry->setContent($content->getBody());