-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v0.1.3] n번째 티켓(랜딩페이지용), 댓글 조회기능 수정 배포
[v0.1.3] n번째 티켓(랜딩페이지용), 댓글 조회기능 수정 배포
- Loading branch information
Showing
10 changed files
with
112 additions
and
75 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { SetMetadata } from '@nestjs/common' | ||
|
||
/** AccessTokenGuard 가 포함된 controller 내부에서 | ||
* AccessToken 없이 접근할 수 있도록 해주는 데코레이터입니다 */ | ||
export const NoAuth = () => SetMetadata('no-auth', true) |
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,13 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { Expose } from 'class-transformer'; | ||
import { IsNumber } from 'class-validator'; | ||
|
||
/** /tickets/count에 대한 Swagger 응답을 위한 dto 입니다 */ | ||
export class TicketCountDto { | ||
@ApiProperty({ | ||
description: 'DB에 저장된 티켓의 총 개수', | ||
}) | ||
@IsNumber() | ||
@Expose() | ||
readonly count: number; | ||
} |
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 |
---|---|---|
@@ -1,33 +1,12 @@ | ||
import { ApiPropertyOptional } from '@nestjs/swagger'; | ||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; | ||
import { Expose, Type } from 'class-transformer'; | ||
import { IsInt, IsOptional, Max, Min } from 'class-validator'; | ||
|
||
export class ScrollOptionsDto { | ||
@ApiPropertyOptional({ | ||
minimum: 1, | ||
default: 1 | ||
description: '현재 페이지의 마지막 id', | ||
nullable: true | ||
}) | ||
@Type(() => Number) | ||
@IsInt() | ||
@Min(1) | ||
@IsOptional() | ||
@Expose() | ||
readonly page: number = 1; | ||
|
||
@ApiPropertyOptional({ | ||
minimum: 1, | ||
maximum: 50, | ||
default: 20 | ||
}) | ||
@Type(() => Number) | ||
@IsInt() | ||
@Min(1) | ||
@Max(50) | ||
@IsOptional() | ||
@Expose() | ||
readonly take: number = 10; | ||
|
||
get skip(): number { | ||
return (this.page - 1) * this.take; | ||
} | ||
} | ||
readonly lastId: number; | ||
} |
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