mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
refactor: move DQL in repositories
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\MessageHandler;
|
||||
|
||||
use App\Message\UpdateRdapServers;
|
||||
use App\Repository\DomainRepository;
|
||||
use App\Service\OfficialDataService;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
|
||||
@@ -17,7 +18,7 @@ final readonly class UpdateRdapServersHandler
|
||||
{
|
||||
public function __construct(
|
||||
private OfficialDataService $officialDataService,
|
||||
private ParameterBagInterface $bag,
|
||||
private ParameterBagInterface $bag, private DomainRepository $domainRepository,
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -41,7 +42,7 @@ final readonly class UpdateRdapServersHandler
|
||||
try {
|
||||
$this->officialDataService->updateTldListIANA();
|
||||
$this->officialDataService->updateGTldListICANN();
|
||||
$this->officialDataService->updateDomainsWhenTldIsDeleted();
|
||||
$this->domainRepository->setDomainDeletedIfTldIsDeleted();
|
||||
} catch (\Throwable $throwable) {
|
||||
$throws[] = $throwable;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user