Skip to content
Snippets Groups Projects
Commit 81326aa1 authored by L4168's avatar L4168
Browse files

add Interceptor

parent 7a36f4a7
No related branches found
No related tags found
3 merge requests!59Development to master,!48Development,!46Small fixes to Development
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 { ValidationPipe } from '../shared/validation.pipe';
import { ScoreService } from './score.service'; import { ScoreService } from './score.service';
...@@ -29,6 +38,7 @@ export class ScoreController { ...@@ -29,6 +38,7 @@ export class ScoreController {
// shows scores, :id is gameId // shows scores, :id is gameId
@Get('get-score/:id') @Get('get-score/:id')
@UseInterceptors(ClassSerializerInterceptor)
@GameStates('STARTED') @GameStates('STARTED')
async getScores(@Param('id') gameId: GameEntity) { async getScores(@Param('id') gameId: GameEntity) {
return this.scoreService.getScores(gameId); return this.scoreService.getScores(gameId);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment