diff --git a/src/structures/sessions.dto.ts b/src/structures/sessions.dto.ts index 66e4932a..e225bc06 100644 --- a/src/structures/sessions.dto.ts +++ b/src/structures/sessions.dto.ts @@ -2,6 +2,7 @@ import { ApiProperty } from '@nestjs/swagger'; import { BooleanString } from '@waha/nestjs/validation/BooleanString'; import { Transform, Type } from 'class-transformer'; import { + IsArray, IsBoolean, IsOptional, IsString, @@ -81,6 +82,7 @@ export class NowebConfig { export class SessionConfig { @ValidateNested({ each: true }) @Type(() => WebhookConfig) + @IsArray() @IsOptional() webhooks?: WebhookConfig[]; diff --git a/src/structures/webhooks.config.dto.ts b/src/structures/webhooks.config.dto.ts index cb5174fb..deb6cae7 100644 --- a/src/structures/webhooks.config.dto.ts +++ b/src/structures/webhooks.config.dto.ts @@ -89,6 +89,7 @@ export class WebhookConfig { }) @ValidateNested() @Type(() => CustomHeader) + @IsArray() @IsOptional() customHeaders?: CustomHeader[]; }