mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-08 08:13:11 +08:00
Applied API role specs to short URL creation when findIfExists is provided
This commit is contained in:
@@ -234,6 +234,11 @@ class ShortUrlRepository extends EntitySpecificationRepository implements ShortU
|
||||
->setParameter('domain', $meta->getDomain());
|
||||
}
|
||||
|
||||
$apiKey = $meta->getApiKey();
|
||||
if ($apiKey !== null) {
|
||||
$this->applySpecification($qb, $apiKey->spec(), 's');
|
||||
}
|
||||
|
||||
$tagsAmount = count($tags);
|
||||
if ($tagsAmount === 0) {
|
||||
return $qb->getQuery()->getOneOrNullResult();
|
||||
|
||||
Reference in New Issue
Block a user