fix: apply feedbacsk

This commit is contained in:
yassinedorbozgithub 2025-01-13 12:08:29 +01:00
parent efc3ebb9b6
commit 43f92b7774
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ export class ConversationCreateDto {
@IsObjectId({
message: 'Current must be a valid objectId',
})
current?: string;
current?: string | null;
@ApiProperty({ description: 'next conversation', type: Array })
@IsOptional()

View File

@ -80,8 +80,8 @@ export class Conversation extends ConversationStub {
@Transform(({ obj }) => obj.sender.toString())
sender: string;
@Transform(({ obj }) => obj.current.toString())
current: string;
@Transform(({ obj }) => (obj.current ? obj.current.toString() : null))
current: string | null;
@Transform(({ obj }) => obj.next.map((elem) => elem.toString()))
next: string[];