bookmarks in progress missing notifications
This commit is contained in:
@@ -41,6 +41,32 @@ postDB = (DB)=>{
|
||||
});
|
||||
}
|
||||
|
||||
DB.bookmarkPost = async (postid, profileId)=>{
|
||||
const _id = DB.ObjectID(postid);
|
||||
let update = {
|
||||
$addToSet:{
|
||||
bookmarks: DB.ObjectID(profileId)
|
||||
}
|
||||
}
|
||||
return DB.postCols.updateOne({_id}, update).catch((err)=>{
|
||||
console.log(err);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
DB.unbookmarkPost = async (postid, profileId)=>{
|
||||
const _id = DB.ObjectID(postid);
|
||||
let update = {
|
||||
$pull:{
|
||||
bookmarks: DB.ObjectID(profileId)
|
||||
}
|
||||
}
|
||||
return DB.postCols.updateOne({_id}, update).catch((err)=>{
|
||||
console.log(err);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
DB.newComment = (postid, comment) => {
|
||||
const id = DB.ObjectID(postid);
|
||||
return DB.postCols.updateOne({_id: id}, {
|
||||
|
||||
Reference in New Issue
Block a user