mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-18 10:15:41 +00:00
fix: set updatedAt when a deleted domain is queried
This commit is contained in:
parent
f9a41c3954
commit
d153d3af78
@ -15,6 +15,9 @@ use Symfony\Component\HttpKernel\KernelInterface;
|
|||||||
use Symfony\Component\Messenger\Exception\ExceptionInterface;
|
use Symfony\Component\Messenger\Exception\ExceptionInterface;
|
||||||
use Symfony\Component\Messenger\MessageBusInterface;
|
use Symfony\Component\Messenger\MessageBusInterface;
|
||||||
use Symfony\Component\RateLimiter\RateLimiterFactory;
|
use Symfony\Component\RateLimiter\RateLimiterFactory;
|
||||||
|
use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
|
||||||
|
use Symfony\Contracts\HttpClient\Exception\HttpExceptionInterface;
|
||||||
|
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
|
||||||
|
|
||||||
class DomainRefreshController extends AbstractController
|
class DomainRefreshController extends AbstractController
|
||||||
{
|
{
|
||||||
@ -27,8 +30,11 @@ class DomainRefreshController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws Exception
|
* @throws TransportExceptionInterface
|
||||||
|
* @throws HttpExceptionInterface
|
||||||
|
* @throws DecodingExceptionInterface
|
||||||
* @throws ExceptionInterface
|
* @throws ExceptionInterface
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function __invoke(string $ldhName, KernelInterface $kernel): ?Domain
|
public function __invoke(string $ldhName, KernelInterface $kernel): ?Domain
|
||||||
{
|
{
|
||||||
|
|||||||
@ -126,11 +126,10 @@ readonly class RDAPService
|
|||||||
)->toArray();
|
)->toArray();
|
||||||
} catch (HttpExceptionInterface $e) {
|
} catch (HttpExceptionInterface $e) {
|
||||||
if ($domain !== null) {
|
if ($domain !== null) {
|
||||||
$domain->setDeleted(true);
|
$domain->setDeleted(true)
|
||||||
|
->updateTimestamps();
|
||||||
$this->em->persist($domain);
|
$this->em->persist($domain);
|
||||||
$this->em->flush();
|
$this->em->flush();
|
||||||
|
|
||||||
return $domain;
|
|
||||||
}
|
}
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
@ -421,7 +420,7 @@ readonly class RDAPService
|
|||||||
foreach ($gTldList as $gTld) {
|
foreach ($gTldList as $gTld) {
|
||||||
if ($gTld['gTLD'] === "") continue;
|
if ($gTld['gTLD'] === "") continue;
|
||||||
/** @var Tld $gtTldEntity */
|
/** @var Tld $gtTldEntity */
|
||||||
$gtTldEntity = $this->tldRepository->findOneBy([ 'tld' => $gTld['gTLD'] ]);
|
$gtTldEntity = $this->tldRepository->findOneBy(['tld' => $gTld['gTLD']]);
|
||||||
|
|
||||||
if (null == $gtTldEntity) {
|
if (null == $gtTldEntity) {
|
||||||
$gtTldEntity = new Tld();
|
$gtTldEntity = new Tld();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user