1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-12-27 22:18:52 +00:00

First private notification

This commit is contained in:
Pierre HUBERT 2020-03-24 08:10:50 +01:00
parent e6c610a3c0
commit 5eea10398d

View File

@ -79,9 +79,7 @@ export class NotificationsHelper {
if(await this.SimilarExists(n))
return;
throw new Error("Create the notification!")
//await this.Create(n)
await this.Create(n)
}
/**
@ -97,6 +95,18 @@ export class NotificationsHelper {
}) > 0;
}
/**
* Create the notification
*
* @param n The notification
*/
private static async Create(n: Notif) {
await DatabaseHelper.InsertRow(
NOTIFICATIONS_TABLE,
this.NotifToDB(n, true)
)
}
/**
* Count the number of unread notifications of a user
*