set token

This commit is contained in:
aeroreyna
2022-03-24 22:58:22 -07:00
parent f7dd5365c8
commit 4ac85df1bb
2 changed files with 22 additions and 0 deletions

View File

@@ -215,6 +215,19 @@ userDB = (DB) => {
});
}
DB.setProfileToken = (profileid, token)=>{
const _id = DB.ObjectID(profileid);
let update = {
$set:{
token
}
}
return DB.profileCols.updateOne({_id}, update).catch((err)=>{
console.log(err);
return false;
});
}
DB.addNotification = async (profileid, message, postid, commentIndx) => {
const _id = DB.ObjectID(profileid);
let update = {