fix: set updatedAt when a deleted domain is queried

This commit is contained in:
Maël Gangloff
2024-07-25 19:04:59 +02:00
parent f9a41c3954
commit d153d3af78
2 changed files with 10 additions and 5 deletions

View File

@@ -126,11 +126,10 @@ readonly class RDAPService
)->toArray();
} catch (HttpExceptionInterface $e) {
if ($domain !== null) {
$domain->setDeleted(true);
$domain->setDeleted(true)
->updateTimestamps();
$this->em->persist($domain);
$this->em->flush();
return $domain;
}
throw $e;
}
@@ -421,7 +420,7 @@ readonly class RDAPService
foreach ($gTldList as $gTld) {
if ($gTld['gTLD'] === "") continue;
/** @var Tld $gtTldEntity */
$gtTldEntity = $this->tldRepository->findOneBy([ 'tld' => $gTld['gTLD'] ]);
$gtTldEntity = $this->tldRepository->findOneBy(['tld' => $gTld['gTLD']]);
if (null == $gtTldEntity) {
$gtTldEntity = new Tld();