feat: remove lastChanged event

This commit is contained in:
Maël Gangloff 2024-07-15 11:52:51 +02:00
parent aa54d4c9ce
commit 16610205b6
No known key found for this signature in database
GPG Key ID: 11FDC81C24A7F629
2 changed files with 5 additions and 3 deletions

View File

@ -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);
}

View File

@ -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"])