sending emails when new post to profiles
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user