Allow browsing public snips
Fixed big with branch name not existing if nothing committed
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user