payments v1

This commit is contained in:
Adolfo Reyna
2021-11-10 22:03:49 -08:00
parent 687be41e3e
commit 364f38a28d
4 changed files with 112 additions and 43 deletions

View File

@@ -40,6 +40,11 @@ const getDB = new Promise((resolve, reject) => {
.catch(console.error);
}
DB.setUserCustomerId = (username, customer)=>{
return DB.usersCol.updateOne({username}, {$set:{customer}})
.catch(console.error);
}
DB.getUserById = (userid)=>{
const _id = new mongo.ObjectID(userid);
return DB.usersCol.findOne({ _id });