diff --git a/src/helpers/NotificationsHelper.ts b/src/helpers/NotificationsHelper.ts index eb4a549..8232c27 100644 --- a/src/helpers/NotificationsHelper.ts +++ b/src/helpers/NotificationsHelper.ts @@ -317,15 +317,10 @@ export class NotificationsHelper { */ public static async Delete(n: Notif) { // Delete a specific notification - if(n.hasId) - await DatabaseHelper.DeleteRows(NOTIFICATIONS_TABLE, { - id: n.id - }) - - // Delete wider range of notifications - else - await DatabaseHelper.DeleteRows(NOTIFICATIONS_TABLE, this.NotifToDB(n, false)) + const cond = n.hasId ? {id: n.id} : this.NotifToDB(n, false); + // Delete notifications + await DatabaseHelper.DeleteRows(NOTIFICATIONS_TABLE, cond); } /**