feat: block unknown subdomains via tenant check
This commit is contained in:
@@ -79,6 +79,11 @@ func (s *TenantService) ListAll() ([]*domain.Tenant, error) {
|
||||
return s.tenantRepo.FindAll()
|
||||
}
|
||||
|
||||
// GetBySubdomain returns tenant by subdomain or nil
|
||||
func (s *TenantService) GetBySubdomain(subdomain string) (*domain.Tenant, error) {
|
||||
return s.tenantRepo.FindBySubdomain(subdomain)
|
||||
}
|
||||
|
||||
// Delete removes a tenant by ID
|
||||
func (s *TenantService) Delete(id uuid.UUID) error {
|
||||
if err := s.tenantRepo.Delete(id); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user