From 85585696d38f139217c7c3f168c9837ae96ca745 Mon Sep 17 00:00:00 2001 From: Blue Mouse Date: Mon, 26 Aug 2024 02:22:42 +0100 Subject: [PATCH] Method should not be an array --- apps/production/src/project/dto/create-monitor.dto.ts | 4 ++-- apps/production/src/project/entity/monitor.entity.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/production/src/project/dto/create-monitor.dto.ts b/apps/production/src/project/dto/create-monitor.dto.ts index 90df275e7..e230ff4c9 100644 --- a/apps/production/src/project/dto/create-monitor.dto.ts +++ b/apps/production/src/project/dto/create-monitor.dto.ts @@ -49,8 +49,8 @@ export enum HttpType { // DTO for HTTP Options export class HttpOptions { @IsArray() - @IsEnum(HttpMethodEnum, { each: true }) - method: HttpMethodEnum[] + @IsEnum(HttpMethodEnum) + method: HttpMethodEnum @IsOptional() @IsObject() diff --git a/apps/production/src/project/entity/monitor.entity.ts b/apps/production/src/project/entity/monitor.entity.ts index 8d636a543..373bcf83a 100644 --- a/apps/production/src/project/entity/monitor.entity.ts +++ b/apps/production/src/project/entity/monitor.entity.ts @@ -67,7 +67,7 @@ export class MonitorEntity { @ApiProperty() @Column({ type: 'json', nullable: true }) httpOptions: { - method: string[] + method: string body?: Record headers?: Record }