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:
@ -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)
|
||||
|
Reference in New Issue
Block a user