major update
This commit is contained in:
@@ -6,18 +6,22 @@ use MintyPHP\Repository\Tenant\TenantRepository;
|
||||
|
||||
class AuthTenantGateway
|
||||
{
|
||||
public function __construct(private readonly TenantRepository $tenantRepository)
|
||||
{
|
||||
}
|
||||
|
||||
public function findById(int $tenantId): ?array
|
||||
{
|
||||
return (new TenantRepository())->find($tenantId);
|
||||
return $this->tenantRepository->find($tenantId);
|
||||
}
|
||||
|
||||
public function findByUuid(string $uuid): ?array
|
||||
{
|
||||
return (new TenantRepository())->findByUuid($uuid);
|
||||
return $this->tenantRepository->findByUuid($uuid);
|
||||
}
|
||||
|
||||
public function list(): array
|
||||
{
|
||||
return (new TenantRepository())->list();
|
||||
return $this->tenantRepository->list();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user