mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-28 09:03:07 +03:00
Applied API role specs to short URL creation when findIfExists is provided
This commit is contained in:
parent
29cdfaed39
commit
364be2420b
1 changed files with 5 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue