mirror of
https://github.com/wallabag/wallabag.git
synced 2025-10-20 19:52:09 +00:00
replace Response with JsonResponse
This commit is contained in:
parent
d8f9f37ab2
commit
0ca374e6a1
3 changed files with 32 additions and 34 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,18 +6,4 @@ use Doctrine\ORM\EntityRepository;
|
|||
|
||||
class TagRepository extends EntityRepository
|
||||
{
|
||||
public function findByEntries($entryId)
|
||||
{
|
||||
$qb = $this->createQueryBuilder('t')
|
||||
->select('t')
|
||||
->leftJoin('t.id', 'u')
|
||||
->where('e.isStarred = true')
|
||||
->andWhere('u.id =:userId')->setParameter('userId', $userId)
|
||||
->orderBy('e.createdAt', 'desc')
|
||||
->getQuery();
|
||||
|
||||
$paginator = new Paginator($qb);
|
||||
|
||||
return $paginator;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue