import { Controller, Get, Param, Post, UseInterceptors, ClassSerializerInterceptor, } from '@nestjs/common'; import { ReplayService } from './replay.service'; @Controller('replay') export class ReplayController { constructor(private replayservice: ReplayService) {} @Get(':id') @UseInterceptors(ClassSerializerInterceptor) async replayInfo(@Param('id') gameId) { return this.replayservice.replayData(gameId); } @Post('mockdata/:id') async mockData(@Param('id') gameId) { return this.replayservice.mockdata(gameId); } @Get('players/:id') async getPlayers(@Param('id') gameId) { return this.replayservice.getPlayers(gameId); } }