1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-06-21 17:05:16 +00:00

Can delete all the notifications of a given user

This commit is contained in:
2020-07-12 14:02:52 +02:00
parent d358119ae6
commit ead879bc21
3 changed files with 14 additions and 0 deletions

View File

@ -21,6 +21,11 @@ pub fn delete(notification: &PartialNotification) -> ResultBoxError {
.exec()
}
/// Delete all the notifications of a given user
pub fn delete_all_user(user_id: &UserID) -> ResultBoxError {
delete(&PartialNotification::new().set_dest_user_id(user_id))
}
/// Check out whether a similar notification exists for given specifications
pub fn similar_exists(n: &PartialNotification) -> ResultBoxError<bool> {
database::QueryInfo::new(NOTIFICATIONS_TABLE)