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 {
|
export class BaseResponse {
|
||||||
constructor(statusCode: number) {
|
constructor(statusCode: number) {
|
||||||
this.statusCode = statusCode;
|
this.statusCode = statusCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@IsNumber()
|
||||||
|
@Min(100)
|
||||||
|
@Max(599)
|
||||||
statusCode: number;
|
statusCode: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ export class GetNodeResponse extends SuccessResponse {
|
|||||||
@Min(1)
|
@Min(1)
|
||||||
id: number;
|
id: number;
|
||||||
|
|
||||||
@IsNotEmpty()
|
@IsString()
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
@IsBoolean()
|
@IsBoolean()
|
||||||
|
Loading…
Reference in New Issue
Block a user