groups working

This commit is contained in:
Adolfo Reyna
2021-08-19 10:19:10 -07:00
parent 95a7bcb3ff
commit 9f5f23364b
5 changed files with 117 additions and 50 deletions

View File

@@ -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;