22 lines
504 B
JavaScript
22 lines
504 B
JavaScript
const DBName = "EMI_SOCIAL";
|
|
|
|
postDB = (DB)=>{
|
|
DB.paymentsCols = DB.db.db(DBName).collection("payments");
|
|
|
|
DB.newIntent = (intent) => {
|
|
return DB.paymentsCols.insertOne(intent).catch((err)=>{
|
|
console.log(err);
|
|
return false;
|
|
});
|
|
}
|
|
|
|
DB.newResult = (paymentResult) => {
|
|
return DB.paymentsCols.insertOne(paymentResult).catch((err)=>{
|
|
console.log(err);
|
|
return false;
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
module.exports = postDB; |