Added logic to persist device long URLs while creating/editing a short URL

This commit is contained in:
Alejandro Celaya
2023-01-15 13:08:21 +01:00
parent fdadf3ba07
commit a93edf158e
22 changed files with 142 additions and 98 deletions

View File

@@ -51,7 +51,7 @@ class DomainService implements DomainServiceInterface
$repo = $this->em->getRepository(Domain::class);
$groups = group(
$repo->findDomains($apiKey),
fn (Domain $domain) => $domain->getAuthority() === $this->defaultDomain ? 'default' : 'domains',
fn (Domain $domain) => $domain->authority() === $this->defaultDomain ? 'default' : 'domains',
);
return [first($groups['default'] ?? []), $groups['domains'] ?? []];