Fix total score increment

This commit is contained in:
2024-01-12 18:44:49 +01:00
committed by Clément Le Bihan
parent 7a63a66da5
commit e487d6d91e
2 changed files with 2 additions and 2 deletions

View File

@@ -317,7 +317,7 @@ export class AuthController {
@ApiOkResponse({ description: "Successfully added score" })
@ApiUnauthorizedResponse({ description: "Invalid token" })
@Patch("me/score/:score")
addScore(@Request() req: any, @Param("id") score: number) {
addScore(@Request() req: any, @Param("score") score: number) {
return this.usersService.addScore(+req.user.id, score);
}
}

View File

@@ -122,7 +122,7 @@ export class UsersService {
return this.prisma.user.update({
where: { id: where },
data: {
partyPlayed: {
totalScore: {
increment: score,
},
},