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
…#110

Co-authored-by: Eliott C. <[email protected]>
  • Loading branch information
ithiame and coyotte508 authored Jun 16, 2023
1 parent 5a482d6 commit 50846b2
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 @@ -37,7 +37,7 @@ export async function onOrderPaid(order: Order, session: ClientSession) {
const challenges = await collections.challenges
.find({
mode: 'moneyAmount',
beginsAt: { $exists: true, $lt: new Date() },
$or: [{beginsAt: {$exists: false}}, {beginsAt: {$lt: new Date()}}]
endsAt: { $gt: new Date() }
})
.toArray();
Expand Down

0 comments on commit 50846b2

Please sign in to comment.