Skip to content

Commit a28e13d

Browse files
committed
som adjustments
1 parent d151620 commit a28e13d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Controller.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ public function createNotification()
9090
['message' => 'success']
9191
);
9292
$notificationList[] = "Notification {$title} was created";
93-
$this->index(0, $notificationList);
93+
return $this->index(0, $notificationList);
9494
} catch (\Exception $e) {
9595
$this->logger()->error(
9696
'Error creating notification: {message}',
9797
['message' => $e->getMessage()]
9898
);
9999
$notificationList[] = $e->getMessage();
100-
$this->index(0, $notificationList);
100+
return $this->index(0, $notificationList);
101101
}
102102
}
103103

@@ -146,7 +146,7 @@ public function deleteNotification($id = null)
146146
$API->deleteNotification($id);
147147

148148
$notificationList[] = 'Notification ' . $id . ' deleted';
149-
$this->index(0, $notificationList);
149+
return $this->index(0, $notificationList);
150150
} catch (\Exception $e) {
151151
echo $e;
152152
}
@@ -198,7 +198,7 @@ public function updateNotification()
198198
$api = new API();
199199
$api->updateNotification($notificationId, $enabled, $title, $message, $context, $priority, $type, $raw);
200200
$notificationList[] = 'Notification ' . $notificationId . ' updated';
201-
$this->index(0, $notificationList);
201+
return $this->index(0, $notificationList);
202202
} catch (\Exception $e) {
203203
$notificationList[] = 'Notification ' . $notificationId . ' not updated. Error: ' . $e->getMessage();
204204
$this->index(0, $notificationList);

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "RebelNotifications",
33
"description": "Show Notifications to your users.",
4-
"version": "5.0.0",
4+
"version": "5.0.1",
55
"theme": false,
66
"require": {
77
"matomo": ">=5.0.0-stable,<6.0.0-b1"

0 commit comments

Comments
 (0)