This commit is contained in:
yashrajverma 2021-06-07 14:44:46 +05:30
parent dfe82f23ee
commit c331c2ddc3
3 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,4 @@
option_settings:
- namespace: aws:elasticbeanstalk:container:nodejs
option_name: NodeCommand
value: "npm start"

View File

@ -166,7 +166,7 @@ module.exports.postRazorpay = async (req, res, next) => {
name: user.firstName + " " + user.lastName,
email: user.email,
receipt: response.receipt,
date_purchased: response.created_at,
date_purchased: Date.now(),
});
if (coupon && coupon.numAllowed > 0) {
coupon.numAllowed = coupon.numAllowed - 1;

View File

@ -23,6 +23,7 @@ const orderSchema = new Schema({
orderId: {
type: String,
},
date_purchased: Date,
});
module.exports = mongoose.model("Order", orderSchema);