From 210e75222373584a302f39d5f4a10a6f560f902b Mon Sep 17 00:00:00 2001 From: hailin Date: Fri, 9 Jan 2026 20:20:46 -0800 Subject: [PATCH] fix(conversation): add class-validator decorators to DTO classes Co-Authored-By: Claude Opus 4.5 --- .claude/settings.local.json | 3 ++- .../src/conversation/conversation.controller.ts | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 3e3e8bd..e00609d 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -14,7 +14,8 @@ "Bash(docker compose:*)", "Bash(ssh:*)", "Bash(ping:*)", - "Bash(curl:*)" + "Bash(curl:*)", + "Bash(echo \"No health endpoint\" curl -s https://iconsulting.szaiai.com/api/v1/users/profile -H \"x-user-id: test\")" ] } } diff --git a/packages/services/conversation-service/src/conversation/conversation.controller.ts b/packages/services/conversation-service/src/conversation/conversation.controller.ts index c9c9b89..de447df 100644 --- a/packages/services/conversation-service/src/conversation/conversation.controller.ts +++ b/packages/services/conversation-service/src/conversation/conversation.controller.ts @@ -8,13 +8,18 @@ import { HttpCode, HttpStatus, } from '@nestjs/common'; +import { IsOptional, IsString, IsNotEmpty } from 'class-validator'; import { ConversationService } from './conversation.service'; class CreateConversationDto { + @IsOptional() + @IsString() title?: string; } class SendMessageDto { + @IsNotEmpty() + @IsString() content: string; }