Skip to content

Commit

Permalink
archive message
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulloooh committed Mar 21, 2021
1 parent f068457 commit c34ed80
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions models/ad.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const adSchema = new mongoose.Schema(
required: true,
enum: ["SMS", "EMAIL"],
},
message: String,
},
{
timestamps: true,
Expand Down
2 changes: 2 additions & 0 deletions routes/ad.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ router.post("/sendsms", async (req, res) => {
expected_cost,
user: req.user._id,
kind: "SMS",
message,
}).save();

if (!start || !charge_user.success || charge_user.problem)
Expand Down Expand Up @@ -384,6 +385,7 @@ router.post("/sendemail", async (req, res) => {
expected_cost,
user: req.user._id,
kind: "EMAIL",
message,
}).save();

if (!start || !charge_user.success || charge_user.problem)
Expand Down

0 comments on commit c34ed80

Please sign in to comment.