From 2fcb7521ad94337f7e6d34769b9bb5f0f5b0dbc2 Mon Sep 17 00:00:00 2001 From: morteza-mortezai Date: Mon, 22 Dec 2025 09:07:51 +0330 Subject: [PATCH] update dto --- src/modules/notifications/dto/update-preference.dto.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/notifications/dto/update-preference.dto.ts b/src/modules/notifications/dto/update-preference.dto.ts index 914ad28..19af347 100644 --- a/src/modules/notifications/dto/update-preference.dto.ts +++ b/src/modules/notifications/dto/update-preference.dto.ts @@ -1,14 +1,14 @@ import { ApiProperty } from '@nestjs/swagger'; -import { NotifChannelEnum } from '../interfaces/notification.interface'; import { IsArray, IsEnum } from 'class-validator'; +import { NotifChannelEnum } from '../interfaces/notification.interface'; export class UpdatePreferenceDto { @ApiProperty({ - description: 'Notification type (SMS, PUSH, BOTH, or NONE)', + description: 'Notification channels (can be empty or contain any enum values)', enum: NotifChannelEnum, - example: NotifChannelEnum.SMS, + isArray: true, + example: ['sms', 'push'], }) - @IsEnum(NotifChannelEnum) @IsArray() @IsEnum(NotifChannelEnum, { each: true }) channels!: NotifChannelEnum[];