diff --git a/src/Controller/DomainController.php b/src/Controller/DomainController.php index fd464f9..e903794 100644 --- a/src/Controller/DomainController.php +++ b/src/Controller/DomainController.php @@ -3,6 +3,7 @@ namespace App\Controller; use App\Repository\DomainRepository; +use App\Repository\NameserverRepository; error_reporting(error_level: E_ALL); @@ -18,7 +19,7 @@ class DomainController private string $namedConfLocalFile; private string $zoneCachePath; - public function __construct(private NameserverController $nameserverController, private CheckController $checkController, private DomainRepository $domainRepository) + public function __construct(private NameserverRepository $nameserverRepository, private CheckController $checkController, private DomainRepository $domainRepository) { $this->localZoneFile = '/etc/bind/local.zones'; $this->localZonesDir = '/etc/bind/zones/'; @@ -82,7 +83,7 @@ class DomainController function deleteOnNameservers(int $id) { - $nameservers = $this->nameserverController->findAll(); + $nameservers = $this->nameserverRepository->findAll(); foreach ($nameservers as $nameserver) { echo($nameserver['name']); $body = [