internal notifications

This commit is contained in:
Adolfo Reyna
2021-09-26 21:32:25 -07:00
parent 997d28d702
commit 600ec549b4
3 changed files with 17 additions and 4 deletions

View File

@@ -115,13 +115,15 @@ userDB = (DB) => {
});
}
DB.addNotification = async (profileid, message) => {
DB.addNotification = async (profileid, message, postid, commentIndx) => {
const _id = DB.ObjectID(profileid);
let update = {
$push:{
notifications: {
ts: new Date(),
body: message
body: message,
postid,
commentIndx
}
}
}