mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-21 00:45:18 +00:00
Can delete a single notification
This commit is contained in:
@ -58,6 +58,19 @@ pub fn mark_seen(r: &mut HttpRequestHandler) -> RequestResult {
|
||||
let notif_id = r.post_notif_id("notifID")?;
|
||||
let delete_similar = r.post_bool_opt("delete_similar", false);
|
||||
|
||||
// TODO : continue implementation
|
||||
r.success("continue implementation")
|
||||
// Check if we are targeting a precise notification or an undetermined number of similar
|
||||
// notifications
|
||||
if !delete_similar {
|
||||
notifications_helper::delete(
|
||||
&PartialNotification::new()
|
||||
.set_id(notif_id)
|
||||
)?;
|
||||
}
|
||||
|
||||
else {
|
||||
// TODO : implement me
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
r.success("Notification deleted")
|
||||
}
|
Reference in New Issue
Block a user