fix: add validation decorators to conversation DTO
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 38s

This commit is contained in:
WangDL 2026-05-22 10:49:27 +08:00
parent f20bdc0d7a
commit 73e52d2201

View File

@ -1,7 +1,17 @@
import { IsOptional, IsString, MaxLength } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
export class CreateConversationDto {
@ApiProperty({ required: false })
@IsOptional()
@IsString()
@MaxLength(200)
title?: string;
}
export class UpdateConversationDto {
title?: string;
@ApiProperty()
@IsString()
@MaxLength(200)
title: string;
}