1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-11-25 06:49:23 +00:00

Can delete a specific notification

This commit is contained in:
Pierre HUBERT 2020-03-25 08:24:10 +01:00
parent c67112d926
commit 3bf3f18710

View File

@ -245,7 +245,9 @@ export class NotificationsHelper {
public static async Delete(n: Notif) { public static async Delete(n: Notif) {
// Delete a specific notification // Delete a specific notification
if(n.hasId) 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 // Delete wider range of notifications
else else