set token
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user