Remove my snips from public snips
Remove home button and redirect to snip_index
This commit is contained in:
@ -50,11 +50,13 @@ class SnipRepository extends ServiceEntityRepository
|
||||
return $qb->getQuery()->getResult();
|
||||
}
|
||||
|
||||
public function findPublic(): array
|
||||
public function findPublic(User $user): array
|
||||
{
|
||||
$qb = $this->createQueryBuilder('s');
|
||||
$qb->where('s.public = :public')
|
||||
->andWhere('s.createdBy != :user')
|
||||
->setParameter('public', true)
|
||||
->setParameter('user', $user)
|
||||
->orderBy('s.createdAt', 'DESC');
|
||||
|
||||
return $qb->getQuery()->getResult();
|
||||
|
Reference in New Issue
Block a user