Fixed validation errors
This commit is contained in:
parent
f6e92abbb8
commit
42ddbaea33
@ -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;
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ export class GetNodeResponse extends SuccessResponse {
|
||||
@Min(1)
|
||||
id: number;
|
||||
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
name: string;
|
||||
|
||||
@IsBoolean()
|
||||
|
Loading…
Reference in New Issue
Block a user