diff --git a/dto/src/responses/base.ts b/dto/src/responses/base.ts index 48ec026..7667e40 100644 --- a/dto/src/responses/base.ts +++ b/dto/src/responses/base.ts @@ -1,8 +1,13 @@ +import { IsNumber, Max, Min } from 'class-validator'; + export class BaseResponse { constructor(statusCode: number) { this.statusCode = statusCode; } + @IsNumber() + @Min(100) + @Max(599) statusCode: number; } diff --git a/dto/src/responses/fs.ts b/dto/src/responses/fs.ts index b4c0ef0..2ecb48c 100644 --- a/dto/src/responses/fs.ts +++ b/dto/src/responses/fs.ts @@ -38,7 +38,7 @@ export class GetNodeResponse extends SuccessResponse { @Min(1) id: number; - @IsNotEmpty() + @IsString() name: string; @IsBoolean()