@@ -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 );
0 commit comments