This commit is contained in:
danis
2023-09-25 13:31:49 +02:00
parent 291d7698d4
commit a0ca945c72
2 changed files with 12 additions and 11 deletions
+7 -11
View File
@@ -1,16 +1,6 @@
import {
BadRequestException,
Body,
Controller,
Get,
HttpCode,
InternalServerErrorException,
NotFoundException,
Param,
ParseIntPipe,
Post,
Request,
UseGuards,
} from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { ScoresService } from './scores.service';
@@ -18,6 +8,12 @@ import { ScoresService } from './scores.service';
@ApiTags('scores')
@Controller('scores')
export class ScoresController {
constructor(private readonly searchService: ScoresService) {}
constructor(private readonly scoresService: ScoresService) {}
@ApiOkResponse({ description: 'Successfully sent the Top 3 players'})
@Get('scores/top/3')
getTopThree(): Promise<any> {
return await this.scoresService.topThree();
}
}
+5
View File
@@ -6,4 +6,9 @@ export class ScoresService {
constructor(
private prisma: PrismaService,
) {}
async topThree(): Promise<any> {
// return this.prisma.
return [];
}
}