1
0
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:
2020-07-11 13:47:07 +02:00
parent 7519ce59fc
commit 55dc7a43b0
4 changed files with 50 additions and 3 deletions

View File

@ -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")
}