Skip to content
Snippets Groups Projects
Commit 98371797 authored by GUILLORET SIMON's avatar GUILLORET SIMON
Browse files

feat: add score

parent 09471359
2 merge requests!95V4.0,!92Feature/84 stats for party
......@@ -197,6 +197,18 @@ export class PartyController {
return party;
}
@Get('/score')
@UseGuards(AuthGuard, UserGuard)
async getScore(@Req() req: UserRequest) {
const userId = req.userId;
const user = await this.userService.findOneWithPartyInfos(userId);
const run = await this.runService.getRunByPartyAndHost(user.id);
return run.score;
}
@Post('answer')
@UseGuards(AuthGuard, UserGuard)
async answer(@Req() req: UserRequest, @Body() body: any) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment