fix: entry id must be a valid URL

This commit is contained in:
Maël Gangloff
2025-04-27 17:38:04 +02:00
parent c0dcb2f848
commit 27078a2a00

View File

@@ -511,14 +511,13 @@ class WatchListController extends AbstractController
$entries = [];
foreach ($domain->getEvents()->filter(fn (DomainEvent $e) => $e->getDate()->diff(new \DateTimeImmutable('now'))->y <= 10)->getIterator() as $event) {
$entries[] = (new Entry())
->setId('event-'.$event->getId())
->setId($baseUrl . "/api/domains/" . $domain->getLdhName() . '/events/' . $event->getId())
->setTitle($domain->getLdhName() . ': ' . $event->getAction(). ' - event update')
->setDescription("Domain name event")
->setLink($baseUrl . "/#/search/domain/" . $domain->getLdhName())
->setContent($this->render('rss/event_entry.html.twig', [
'event' => $event
])->getContent())
->setDateCreated($event->getDate())
->setDateModified($event->getDate())
->addAuthor(["name" => strtoupper($domain->getTld()->getTld()) . " Registry"]);
}
@@ -543,7 +542,7 @@ class WatchListController extends AbstractController
}
$entries[] = (new Entry())
->setId('status-' . $domainStatus->getId())
->setId($baseUrl . "/api/domains/" . $domain->getLdhName() . '/status/' . $domainStatus->getId())
->setTitle($domain->getLdhName() . ' - EPP status update')
->setDescription("There has been a change in the EPP status of the domain name.")
->setLink($baseUrl . "/#/search/domain/" . $domain->getLdhName())