From 70bc6a4b262fd104d6445d3d2260b882dc8c8017 Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 24 Sep 2024 12:23:41 -0400 Subject: [PATCH] fix: notifications link for mobile / desktop Fixes #316 Signed-off-by: Josh --- lib/BackgroundJobs/AdminNotification.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/BackgroundJobs/AdminNotification.php b/lib/BackgroundJobs/AdminNotification.php index ee8a8ff..fc89f33 100644 --- a/lib/BackgroundJobs/AdminNotification.php +++ b/lib/BackgroundJobs/AdminNotification.php @@ -36,15 +36,17 @@ protected function run($argument): void { ->setSubject('updated') ->setObject('dummy', '23'); + $enableLink = $this->url->getAbsoluteURL($this->url->linkTo('', 'ocs/v2.php/apps/survey_client/api/v1/monthly'), 'POST')); $enableAction = $notification->createAction(); $enableAction->setLabel('enable') - ->setLink($this->url->getAbsoluteURL('ocs/v2.php/apps/survey_client/api/v1/monthly'), 'POST') + ->setLink($enableLink) ->setPrimary(true); $notification->addAction($enableAction); + $disableLink = $this->url->getAbsoluteURL($this->url->linkTo('', 'ocs/v2.php/apps/survey_client/api/v1/monthly'), 'DELETE')); $disableAction = $notification->createAction(); $disableAction->setLabel('disable') - ->setLink($this->url->getAbsoluteURL('ocs/v2.php/apps/survey_client/api/v1/monthly'), 'DELETE') + ->setLink($disableLink) ->setPrimary(false); $notification->addAction($disableAction);