diff --git a/src/Infrastructure/Common/DTO/PaginationDTO.ts b/src/Infrastructure/Common/DTO/PaginationDTO.ts index fa78a05e..7f46f579 100644 --- a/src/Infrastructure/Common/DTO/PaginationDTO.ts +++ b/src/Infrastructure/Common/DTO/PaginationDTO.ts @@ -1,3 +1,4 @@ +import { Transform, Type } from 'class-transformer'; import { IsNumber, IsOptional, Max, Min } from 'class-validator'; export class PaginationDTO { @@ -5,5 +6,6 @@ export class PaginationDTO { @Min(1) @Max(10000) @IsNumber() + @Transform((_, { page }) => +page) public page = 1; }