sending emails when new post to profiles

This commit is contained in:
Adolfo Reyna
2021-09-14 11:19:44 -07:00
parent f92aa70621
commit f2ebec71aa
6 changed files with 92 additions and 3 deletions

View File

@@ -34,6 +34,11 @@ const getDB = new Promise((resolve, reject) => {
return DB.usersCol.findOne({ username: username });
}
DB.getUserById = (userid)=>{
const _id = new mongo.ObjectID(userid);
return DB.usersCol.findOne({ _id });
}
DB.newUser = (userInformation)=>{
return DB.usersCol.insertOne(userInformation).catch((err)=>{
console.log(err);