Skip to content

Commit

Permalink
Increment challenge score when a whitelisted product is ordered & paid
Browse files Browse the repository at this point in the history
  • Loading branch information
ithiame committed Jun 16, 2023
1 parent 0b36845 commit 1cf1ed5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/server/orders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export async function onOrderPaid(order: Order, session: ClientSession) {
endsAt: { $gt: new Date() }
})
.toArray();
let numberOfProducts = sum(order.items.map((item) => item.quantity));
const numberOfProducts = sum(order.items.map((item) => item.quantity));
for (const challenge of challenges) {
await collections.challenges.updateOne(
{ _id: challenge._id },
Expand Down

0 comments on commit 1cf1ed5

Please sign in to comment.