mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-05 21:38:06 +03:00
feat: add ReadUsersNotifications fn
This commit is contained in:
@@ -35,6 +35,19 @@ export function ReadNotification(notifID: string) {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark all of a user's notifications as read.
|
||||
*/
|
||||
export function ReadUsersNotifications(userID: integer) {
|
||||
return db.notifications.update(
|
||||
{ sentTo: userID },
|
||||
{
|
||||
$set: { read: true },
|
||||
},
|
||||
{ multi: true }
|
||||
);
|
||||
}
|
||||
|
||||
export function DeleteNotification(notifID: string) {
|
||||
return db.notifications.remove({ notifID });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user