update dto
This commit is contained in:
@@ -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[];
|
||||
|
||||
Reference in New Issue
Block a user