Use routes via name

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2021-11-24 15:08:26 +01:00
parent a10fc3ddd8
commit 0364647289
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
1 changed files with 6 additions and 4 deletions

View File

@ -112,14 +112,16 @@ class AppointmentsAction implements ILinkAction {
// Directly link to this one appointment
if (count($this->configs) === 1) {
return $this->urlGenerator->getAbsoluteURL(
'/apps/calendar/appointment/' . $this->configs[0]->getToken()
return $this->urlGenerator->linkToRouteAbsolute(
'calendar.appointment.show',
['token' => $this->configs[0]->getToken()],
);
}
// Link to the overview page
return $this->urlGenerator->getAbsoluteURL(
'/apps/calendar/appointments/' . $this->targetUser->getUID()
return $this->urlGenerator->linkToRouteAbsolute(
'calendar.appointment.index',
['userId' => $this->targetUser->getUID()],
);
}
}