1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-01-14 14:37:44 +00:00

Remove useless condition

This commit is contained in:
Pierre HUBERT 2020-07-11 13:51:15 +02:00
parent 55dc7a43b0
commit cf549f973c

View File

@ -12,20 +12,7 @@ use crate::helpers::database;
/// Delete notifications
pub fn delete(notification: &PartialNotification) -> ResultBoxError {
// 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)
}
};
let conditions = notif_to_db(notification, false);
// Delete the notifications