Skip to content

Commit

Permalink
fix: problemStatus initial value (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
thezzisu authored Jan 17, 2024
1 parent 436cf93 commit e7ee324
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .yarn/versions/b30e0517.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
releases:
"@aoi-js/server": patch
4 changes: 2 additions & 2 deletions apps/server/src/routes/problem/scoped.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ export const problemScopedRoutes = defineRoutes(async (s) => {
solutionCount: upserted && maxSolutionCount ? { $lt: maxSolutionCount } : undefined
},
{
$inc: upserted ? { solutionCount: 1 } : undefined,
$inc: { solutionCount: upserted ? 1 : undefined },
$set: { lastSolutionId: value._id, lastSolutionScore: 0, lastSolutionStatus: '' },
$setOnInsert: { _id: new BSON.UUID() }
$setOnInsert: { _id: new BSON.UUID(), solutionCount: upserted ? undefined : 0 }
},
{ upsert: true, ignoreUndefined: true }
)
Expand Down

0 comments on commit e7ee324

Please sign in to comment.