1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-11-26 07:19:23 +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)) if(await this.SimilarExists(n))
return; return;
await this.Create(n)
throw new Error("Create the notification!")
//await this.Create(n)
} }
/** /**
@ -97,6 +95,18 @@ export class NotificationsHelper {
}) > 0; }) > 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 * Count the number of unread notifications of a user
* *