mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-01-14 22:47:44 +00:00
Remove useless condition
This commit is contained in:
parent
55dc7a43b0
commit
cf549f973c
@ -12,20 +12,7 @@ use crate::helpers::database;
|
|||||||
|
|
||||||
/// Delete notifications
|
/// Delete notifications
|
||||||
pub fn delete(notification: &PartialNotification) -> ResultBoxError {
|
pub fn delete(notification: &PartialNotification) -> ResultBoxError {
|
||||||
|
let conditions = notif_to_db(notification, false);
|
||||||
// Check if we have to delete a specific notification or a group of similar notifications
|
|
||||||
let conditions = match notification.id {
|
|
||||||
Some(id) => {
|
|
||||||
let mut map = HashMap::new();
|
|
||||||
map.insert("id".to_string(), mysql::Value::from(id));
|
|
||||||
map
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete similar notifications
|
|
||||||
None => {
|
|
||||||
notif_to_db(notification, false)
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// Delete the notifications
|
// Delete the notifications
|
||||||
|
Loading…
Reference in New Issue
Block a user