groups working
This commit is contained in:
@@ -67,7 +67,6 @@ postDB = (DB)=>{
|
||||
lastUpdated: new Date()
|
||||
}
|
||||
}
|
||||
console.log(JSON.stringify(update));
|
||||
return DB.postCols.updateOne({
|
||||
_id: id,
|
||||
"comments.createdAt": commentDate
|
||||
@@ -101,6 +100,15 @@ postDB = (DB)=>{
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
DB.getPost = (postId) => {
|
||||
let _id = DB.ObjectID(postId);
|
||||
return DB.postCols.findOne({_id}).catch((err)=>{
|
||||
console.log(err);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = postDB;
|
||||
Reference in New Issue
Block a user