diff --git a/src/score/score.controller.ts b/src/score/score.controller.ts index 2fdebd9cbc1103961fcf99dad448aa5c838f144d..dd26dd24daaec51422557339c8d1a5939ca58ffc 100644 --- a/src/score/score.controller.ts +++ b/src/score/score.controller.ts @@ -1,4 +1,13 @@ -import { Controller, Post, UsePipes, Body, Param, Get } from '@nestjs/common'; +import { + Controller, + Post, + UsePipes, + Body, + Param, + Get, + UseInterceptors, + ClassSerializerInterceptor, +} from '@nestjs/common'; import { ValidationPipe } from '../shared/validation.pipe'; import { ScoreService } from './score.service'; @@ -29,6 +38,7 @@ export class ScoreController { // shows scores, :id is gameId @Get('get-score/:id') + @UseInterceptors(ClassSerializerInterceptor) @GameStates('STARTED') async getScores(@Param('id') gameId: GameEntity) { return this.scoreService.getScores(gameId);