From 9fb8b801a67b28ff53d7eddade8001f4f3fe5372 Mon Sep 17 00:00:00 2001 From: divinedab Date: Wed, 18 Sep 2024 21:34:35 -0500 Subject: [PATCH] points for puzzles --- src/services/puzzlebang/puzzlebang-router.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/services/puzzlebang/puzzlebang-router.ts b/src/services/puzzlebang/puzzlebang-router.ts index a4f1a7b..a9c2eb5 100644 --- a/src/services/puzzlebang/puzzlebang-router.ts +++ b/src/services/puzzlebang/puzzlebang-router.ts @@ -18,7 +18,10 @@ puzzlebangRouter.post( const attendeeData = await Database.ATTENDEE.findOneAndUpdate( { email: requestInfo.email }, - { $addToSet: { puzzlesCompleted: requestInfo.puzzleId } }, + { + $addToSet: { puzzlesCompleted: requestInfo.puzzleId }, + $inc: { points: 2 }, + }, { new: false } );