mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-17 17:55:42 +00:00
feat: remove lastChanged event
This commit is contained in:
parent
aa54d4c9ce
commit
16610205b6
@ -19,6 +19,7 @@ use Eluceo\iCal\Presentation\Factory\CalendarFactory;
|
||||
use Exception;
|
||||
use Sabre\VObject\Reader;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
|
||||
@ -34,11 +35,11 @@ class TestController extends AbstractController
|
||||
|
||||
}
|
||||
|
||||
#[Route(path: '/test/register/{fqdn}', name: 'test_register_domain')]
|
||||
public function testRegisterDomain(string $fqdn): Response
|
||||
#[Route(path: '/test/register', name: 'test_register_domain')]
|
||||
public function testRegisterDomain(Request $request): Response
|
||||
{
|
||||
try {
|
||||
$this->RDAPService->registerDomains([$fqdn]);
|
||||
$this->RDAPService->registerDomains(explode(',', $request->query->get('domains')));
|
||||
} catch (Exception $e) {
|
||||
return new Response($e->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
@ -224,6 +224,7 @@ readonly class RDAPService
|
||||
if (!array_key_exists('events', $rdapEntity)) return $entity;
|
||||
|
||||
foreach ($rdapEntity['events'] as $rdapEntityEvent) {
|
||||
if ($rdapEntityEvent["eventAction"] === EventAction::LastChanged->value) continue;
|
||||
$event = $this->entityEventRepository->findOneBy([
|
||||
"action" => EventAction::from($rdapEntityEvent["eventAction"]),
|
||||
"date" => new DateTimeImmutable($rdapEntityEvent["eventDate"])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user