From 3bf3f18710c1f932acf1af924f67dd2fb885a314 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Wed, 25 Mar 2020 08:24:10 +0100 Subject: [PATCH] Can delete a specific notification --- src/helpers/NotificationsHelper.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/helpers/NotificationsHelper.ts b/src/helpers/NotificationsHelper.ts index 86f59c3..8c243cd 100644 --- a/src/helpers/NotificationsHelper.ts +++ b/src/helpers/NotificationsHelper.ts @@ -245,7 +245,9 @@ export class NotificationsHelper { public static async Delete(n: Notif) { // Delete a specific notification if(n.hasId) - throw new Error("Please implement notification deletion with known ID!"); + await DatabaseHelper.DeleteRows(NOTIFICATIONS_TABLE, { + id: n.id + }) // Delete wider range of notifications else