From bb943c8e7ed1f5578692934a1cc11ec92a9d7ff9 Mon Sep 17 00:00:00 2001 From: Peter Vacho Date: Tue, 31 Dec 2024 01:30:56 +0100 Subject: [PATCH] Make marking notifs as read POST, not GET --- src/api/notifications.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/notifications.py b/src/api/notifications.py index 38aeb00..bd91881 100644 --- a/src/api/notifications.py +++ b/src/api/notifications.py @@ -89,7 +89,7 @@ async def get_notification(notification_id: PydanticObjectId, user: CurrentUserD return NotificationData.from_notification(notification) -@notifications_router.get("/{notification_id}/read") +@notifications_router.post("/{notification_id}/read") async def read_notification(notification_id: PydanticObjectId, user: CurrentUserDep) -> NotificationData: """Mark a notification as read.""" notification = await Notification.get(notification_id, fetch_links=True)