fix(conversation): add class-validator decorators to DTO classes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
f06e6ee76e
commit
210e752223
|
|
@ -14,7 +14,8 @@
|
||||||
"Bash(docker compose:*)",
|
"Bash(docker compose:*)",
|
||||||
"Bash(ssh:*)",
|
"Bash(ssh:*)",
|
||||||
"Bash(ping:*)",
|
"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\")"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,18 @@ import {
|
||||||
HttpCode,
|
HttpCode,
|
||||||
HttpStatus,
|
HttpStatus,
|
||||||
} from '@nestjs/common';
|
} from '@nestjs/common';
|
||||||
|
import { IsOptional, IsString, IsNotEmpty } from 'class-validator';
|
||||||
import { ConversationService } from './conversation.service';
|
import { ConversationService } from './conversation.service';
|
||||||
|
|
||||||
class CreateConversationDto {
|
class CreateConversationDto {
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
title?: string;
|
title?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
class SendMessageDto {
|
class SendMessageDto {
|
||||||
|
@IsNotEmpty()
|
||||||
|
@IsString()
|
||||||
content: string;
|
content: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue