mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat(api): add tld property in domain endpoint
This commit is contained in:
@@ -36,7 +36,8 @@ use Symfony\Component\Serializer\Attribute\Groups;
|
|||||||
'entity:list',
|
'entity:list',
|
||||||
'domain-entity:entity',
|
'domain-entity:entity',
|
||||||
'nameserver-entity:nameserver',
|
'nameserver-entity:nameserver',
|
||||||
'nameserver-entity:entity'
|
'nameserver-entity:entity',
|
||||||
|
'tld:item'
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
@@ -107,6 +108,7 @@ class Domain
|
|||||||
|
|
||||||
#[ORM\ManyToOne]
|
#[ORM\ManyToOne]
|
||||||
#[ORM\JoinColumn(referencedColumnName: 'tld', nullable: false)]
|
#[ORM\JoinColumn(referencedColumnName: 'tld', nullable: false)]
|
||||||
|
#[Groups(['domain:item'])]
|
||||||
private ?Tld $tld = null;
|
private ?Tld $tld = null;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
|||||||
@@ -225,7 +225,8 @@ readonly class RDAPService
|
|||||||
if (!array_key_exists('events', $rdapEntity)) return $entity;
|
if (!array_key_exists('events', $rdapEntity)) return $entity;
|
||||||
|
|
||||||
foreach ($rdapEntity['events'] as $rdapEntityEvent) {
|
foreach ($rdapEntity['events'] as $rdapEntityEvent) {
|
||||||
if ($rdapEntityEvent["eventAction"] === EventAction::LastChanged->value) continue;
|
$eventAction = $rdapEntityEvent["eventAction"];
|
||||||
|
if ($eventAction === EventAction::LastChanged->value || $eventAction === EventAction::LastUpdateOfRDAPDatabase) continue;
|
||||||
$event = $this->entityEventRepository->findOneBy([
|
$event = $this->entityEventRepository->findOneBy([
|
||||||
"action" => EventAction::from($rdapEntityEvent["eventAction"]),
|
"action" => EventAction::from($rdapEntityEvent["eventAction"]),
|
||||||
"date" => new DateTimeImmutable($rdapEntityEvent["eventDate"])
|
"date" => new DateTimeImmutable($rdapEntityEvent["eventDate"])
|
||||||
|
|||||||
Reference in New Issue
Block a user