diff --git a/back/src/auth/auth.controller.ts b/back/src/auth/auth.controller.ts index 9648713..0ed43cf 100644 --- a/back/src/auth/auth.controller.ts +++ b/back/src/auth/auth.controller.ts @@ -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); } } diff --git a/back/src/users/users.service.ts b/back/src/users/users.service.ts index b18b47a..a9ac7be 100644 --- a/back/src/users/users.service.ts +++ b/back/src/users/users.service.ts @@ -122,7 +122,7 @@ export class UsersService { return this.prisma.user.update({ where: { id: where }, data: { - partyPlayed: { + totalScore: { increment: score, }, },