mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-12-27 22:18:52 +00:00
First private notification
This commit is contained in:
parent
e6c610a3c0
commit
5eea10398d
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user