[core] check is array object

fixes #470
This commit is contained in:
devlikepro committed 2024-08-27 16:42:25 +07:00
1 parent 63a4e693e3
commit 679757ccfa
2 files changed
+3

No files matched your search

+2
View File
@@ -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[];
+1
View File
@@ -89,6 +89,7 @@ export class WebhookConfig {
})
@ValidateNested()
@Type(() => CustomHeader)
@IsArray()
@IsOptional()
customHeaders?: CustomHeader[];
}