mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
Agent/feature/delete all notifications (#317)
* updates to GHC 8.10.4 * adds delete all notifications handler
This commit is contained in:
committed by
Aiden McClelland
parent
82df17d854
commit
0b5e4ca7af
@@ -50,7 +50,7 @@
|
|||||||
/v0/wifi WifiR GET POST
|
/v0/wifi WifiR GET POST
|
||||||
/v0/wifi/#Text WifiBySsidR POST DELETE
|
/v0/wifi/#Text WifiBySsidR POST DELETE
|
||||||
|
|
||||||
/v0/notifications NotificationsR GET
|
/v0/notifications NotificationsR GET DELETE
|
||||||
/v0/notifications/#UUID NotificationR DELETE
|
/v0/notifications/#UUID NotificationR DELETE
|
||||||
|
|
||||||
/v0/shutdown ShutdownR POST
|
/v0/shutdown ShutdownR POST
|
||||||
|
|||||||
@@ -28,5 +28,9 @@ getNotificationsR = runDB $ do
|
|||||||
Nothing -> pure a
|
Nothing -> pure a
|
||||||
Just x -> pure x
|
Just x -> pure x
|
||||||
|
|
||||||
|
deleteNotificationsR :: Handler ()
|
||||||
|
deleteNotificationsR = do
|
||||||
|
runDB $ deleteWhere ([] :: [Filter Notification])
|
||||||
|
|
||||||
deleteNotificationR :: UUID -> Handler ()
|
deleteNotificationR :: UUID -> Handler ()
|
||||||
deleteNotificationR notifId = runDB $ delete (coerce @_ @(Key Notification) notifId)
|
deleteNotificationR notifId = runDB $ delete (coerce @_ @(Key Notification) notifId)
|
||||||
|
|||||||
Reference in New Issue
Block a user