mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-09-25 22:29:45 +00:00
Can delete all the notifications of a given user
This commit is contained in:
@@ -71,4 +71,11 @@ pub fn mark_seen(r: &mut HttpRequestHandler) -> RequestResult {
|
||||
notifications_helper::delete(¬if)?;
|
||||
|
||||
r.success("Notification deleted")
|
||||
}
|
||||
|
||||
/// Delete all the notifications of the current user
|
||||
pub fn delete_all(r: &mut HttpRequestHandler) -> RequestResult {
|
||||
notifications_helper::delete_all_user(r.user_id_ref()?)?;
|
||||
|
||||
r.success("Notifications deleted.")
|
||||
}
|
Reference in New Issue
Block a user