Allow browsing public snips

Fixed big with branch name not existing if nothing committed
This commit is contained in:
Tim
2023-04-06 20:30:11 +02:00
parent ce456adf10
commit 004044022d
7 changed files with 49 additions and 4 deletions

View File

@ -49,4 +49,14 @@ class SnipRepository extends ServiceEntityRepository
return $qb->getQuery()->getResult();
}
public function findPublic(): array
{
$qb = $this->createQueryBuilder('s');
$qb->where('s.public = :public')
->setParameter('public', true)
->orderBy('s.createdAt', 'DESC');
return $qb->getQuery()->getResult();
}
}