Make marking notifs as read POST, not GET
This commit is contained in:
parent
0f820d12e3
commit
bb943c8e7e
|
@ -89,7 +89,7 @@ async def get_notification(notification_id: PydanticObjectId, user: CurrentUserD
|
||||||
return NotificationData.from_notification(notification)
|
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:
|
async def read_notification(notification_id: PydanticObjectId, user: CurrentUserDep) -> NotificationData:
|
||||||
"""Mark a notification as read."""
|
"""Mark a notification as read."""
|
||||||
notification = await Notification.get(notification_id, fetch_links=True)
|
notification = await Notification.get(notification_id, fetch_links=True)
|
||||||
|
|
Loading…
Reference in a new issue