Skip to content

Commit

Permalink
fix: pagimation validation
Browse files Browse the repository at this point in the history
  • Loading branch information
khuongln-1346 committed Dec 6, 2024
1 parent 4b99544 commit 117bd18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/common/dto/cursor-pagination/page-options.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class PageOptionsDto {
beforeCursor?: string;

@NumberFieldOptional({
minimum: 1,
min: 1,
default: DEFAULT_PAGE_LIMIT,
int: true,
})
Expand Down
4 changes: 2 additions & 2 deletions src/common/dto/offset-pagination/page-options.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import {

export class PageOptionsDto {
@NumberFieldOptional({
minimum: 1,
min: 1,
default: DEFAULT_PAGE_LIMIT,
int: true,
})
readonly limit?: number = DEFAULT_PAGE_LIMIT;

@NumberFieldOptional({
minimum: 1,
min: 1,
default: DEFAULT_CURRENT_PAGE,
int: true,
})
Expand Down

0 comments on commit 117bd18

Please sign in to comment.