kernal clean-up

This commit is contained in:
root
2025-12-21 19:33:47 -05:00
parent 3ffabfe3a3
commit 658a319ded
22 changed files with 832 additions and 334 deletions

View File

@@ -12,6 +12,10 @@ class SessionTenant
private ?string $domain = null;
private bool $configured = false;
public function __construct(
private readonly TenantService $tenantService
) {}
/**
* Configure the tenant information
* This method is called by the SecurityMiddleware after validation
@@ -21,8 +25,7 @@ class SessionTenant
if ($this->configured) {
return;
}
$service = Server::runtimeContainer()->get(TenantService::class);
$tenant = $service->fetchByDomain($domain);
$tenant = $this->tenantService->fetchByDomain($domain);
if ($tenant) {
$this->domain = $domain;
$this->tenant = $tenant;