Skip to content

Commit

Permalink
minor change to subscription format
Browse files Browse the repository at this point in the history
  • Loading branch information
AydanPirani authored Apr 11, 2024
1 parent 58bc6d9 commit 1cdd1d9
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 @@ -10,8 +10,8 @@ subscriptionRouter.post("/", async (req, res, next) => {
try {
const subscriptionData = SubscriptionValidator.parse(req.body);
await Database.SUBSCRIPTION.findOneAndUpdate(
{ email: subscriptionData.email },
{ mailingList: subscriptionData.mailingList },
{ $push: { subscriptions: data.email } },
{ upsert: true, new: true }
);
return res.status(StatusCodes.CREATED).json(subscriptionData);
Expand Down

0 comments on commit 1cdd1d9

Please sign in to comment.