Skip to content

Commit

Permalink
Update subscription-router.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
AydanPirani authored Apr 11, 2024
1 parent 1cdd1d9 commit 6303fce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/subscription/subscription-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ subscriptionRouter.post("/", async (req, res, next) => {
const subscriptionData = SubscriptionValidator.parse(req.body);
await Database.SUBSCRIPTION.findOneAndUpdate(
{ mailingList: subscriptionData.mailingList },
{ $push: { subscriptions: data.email } },
{ $push: { subscriptions: subscriptionData.email } },
{ upsert: true, new: true }
);
return res.status(StatusCodes.CREATED).json(subscriptionData);
Expand Down

0 comments on commit 6303fce

Please sign in to comment.