mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: add domain_status when domain is deleted
This commit is contained in:
@@ -268,7 +268,18 @@ readonly class RDAPService
|
||||
'idnDomain' => $idnDomain,
|
||||
]);
|
||||
|
||||
$domain->setDeleted(true)->updateTimestamps();
|
||||
$domain->updateTimestamps();
|
||||
|
||||
if (!$domain->getDeleted() && $domain->getUpdatedAt() !== $domain->getCreatedAt()) {
|
||||
$this->em->persist((new DomainStatus())
|
||||
->setDomain($domain)
|
||||
->setCreatedAt($domain->getUpdatedAt())
|
||||
->setDate($domain->getUpdatedAt())
|
||||
->setAddStatus([])
|
||||
->setDeleteStatus($domain->getStatus()));
|
||||
}
|
||||
|
||||
$domain->setDeleted(true);
|
||||
$this->em->persist($domain);
|
||||
$this->em->flush();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user