mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +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
8bb6530e24
commit
00636131d7
@@ -50,7 +50,7 @@
|
||||
/v0/wifi WifiR GET POST
|
||||
/v0/wifi/#Text WifiBySsidR POST DELETE
|
||||
|
||||
/v0/notifications NotificationsR GET
|
||||
/v0/notifications NotificationsR GET DELETE
|
||||
/v0/notifications/#UUID NotificationR DELETE
|
||||
|
||||
/v0/shutdown ShutdownR POST
|
||||
|
||||
@@ -28,5 +28,9 @@ getNotificationsR = runDB $ do
|
||||
Nothing -> pure a
|
||||
Just x -> pure x
|
||||
|
||||
deleteNotificationsR :: Handler ()
|
||||
deleteNotificationsR = do
|
||||
runDB $ deleteWhere ([] :: [Filter Notification])
|
||||
|
||||
deleteNotificationR :: UUID -> Handler ()
|
||||
deleteNotificationR notifId = runDB $ delete (coerce @_ @(Key Notification) notifId)
|
||||
|
||||
Reference in New Issue
Block a user