-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from boostcampwm-2024/be/feature/get_my_rank
[BE/feature] 랭킹 조회 api 구현
- Loading branch information
Showing
10 changed files
with
91 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { applyDecorators } from '@nestjs/common'; | ||
import { ApiResponse } from '@nestjs/swagger'; | ||
import { TokenDecorator } from 'src/global/utils/tokenSwagger'; | ||
import { GetRankSuccessResponseDto } from '../dto/getRank.dto'; | ||
|
||
export function getRankResponseDecorator() { | ||
return applyDecorators( | ||
TokenDecorator(), | ||
ApiResponse({ | ||
status: 200, | ||
description: '랭킹 조회 성공', | ||
type: GetRankSuccessResponseDto | ||
}) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import { applyDecorators } from '@nestjs/common'; | ||
import { ApiResponse } from '@nestjs/swagger'; | ||
import { TokenDecorator } from 'src/global/utils/tokenSwagger'; | ||
import { rank5SuccessResponseDto } from '../dto/top5rank.dto'; | ||
import { Rank5SuccessResponseDto } from '../dto/top5rank.dto'; | ||
|
||
export function top5rankResponseDecorator() { | ||
return applyDecorators( | ||
TokenDecorator(), | ||
ApiResponse({ | ||
status: 200, | ||
description: '5명 조회 성공', | ||
type: rank5SuccessResponseDto | ||
type: Rank5SuccessResponseDto | ||
}) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
|
||
export class GetRankDataDto { | ||
@ApiProperty({ | ||
description: '순위', | ||
example: '5' | ||
}) | ||
rank: number; | ||
} | ||
|
||
export class GetRankSuccessResponseDto { | ||
@ApiProperty({ | ||
description: '응답 코드', | ||
example: 200 | ||
}) | ||
code: number; | ||
|
||
@ApiProperty({ | ||
description: '응답 메세지', | ||
example: '현재 랭킹을 조회했습니다.' | ||
}) | ||
message: string; | ||
|
||
@ApiProperty({ | ||
description: '응답 데이터', | ||
type: GetRankDataDto | ||
}) | ||
data: GetRankDataDto; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters