]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Repository/EntryRepository.php
replace Response with JsonResponse
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Repository / EntryRepository.php
index e102edc7a3ffe4ae0d645694cc15f9a6c668a076..04fe6aa345137f78a0ef7934ae90782550c955a9 100644 (file)
@@ -128,9 +128,11 @@ class EntryRepository extends EntityRepository
     {
         $qb = $this->createQueryBuilder('e')
             ->innerJoin('e.tags', 't')
-            ->addSelect('t')
-            ->where('t.user=:userId')->setParameter('userId', 1);
+            ->innerJoin('e.user', 'u')
+            ->addSelect('t', 'u')
+            ->where('e.user=:userId')->setParameter('userId', $userId)
+        ;
 
-        return $qb->getQuery()->getOneOrNullResult();
+        return $qb->getQuery()->getResult();
     }
 }