Skip to content

Commit a984156

Browse files
joshtrichardsnickvergessen
authored andcommitted
fix(notifications): Make action URLs absolute links to fix mobile and desktop
Signed-off-by: Josh <[email protected]>
1 parent bcd1417 commit a984156

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/BackgroundJobs/AdminNotification.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,17 @@ protected function run($argument): void {
3636
->setSubject('updated')
3737
->setObject('dummy', '23');
3838

39+
$enableLink = $this->url->linkToOCSRouteAbsolute('survey_client.Endpoint.enableMonthly');
3940
$enableAction = $notification->createAction();
4041
$enableAction->setLabel('enable')
41-
->setLink($this->url->getAbsoluteURL('ocs/v2.php/apps/survey_client/api/v1/monthly'), 'POST')
42+
->setLink($enableLink, 'POST')
4243
->setPrimary(true);
4344
$notification->addAction($enableAction);
4445

46+
$disableLink = $this->url->linkToOCSRouteAbsolute('survey_client.Endpoint.disableMonthly');
4547
$disableAction = $notification->createAction();
4648
$disableAction->setLabel('disable')
47-
->setLink($this->url->getAbsoluteURL('ocs/v2.php/apps/survey_client/api/v1/monthly'), 'DELETE')
49+
->setLink($disableLink, 'DELETE')
4850
->setPrimary(false);
4951
$notification->addAction($disableAction);
5052

0 commit comments

Comments
 (0)