fix: update user.dto state property

This commit is contained in:
yassinedorbozgithub 2025-01-10 09:11:23 +01:00
parent 7489648bae
commit e5e5495a42

View File

@ -62,12 +62,21 @@ export class UserCreateDto {
@IsString() @IsString()
@IsObjectId({ message: 'Avatar must be a valid ObjectId' }) @IsObjectId({ message: 'Avatar must be a valid ObjectId' })
avatar: string | null = null; avatar: string | null = null;
@ApiPropertyOptional({
description: 'User state',
type: Boolean,
})
@IsOptional()
@IsBoolean()
state?: boolean;
} }
export class UserEditProfileDto extends OmitType(PartialType(UserCreateDto), [ export class UserEditProfileDto extends OmitType(PartialType(UserCreateDto), [
'username', 'username',
'roles', 'roles',
'avatar', 'avatar',
'state',
]) { ]) {
@ApiPropertyOptional({ description: 'User language', type: String }) @ApiPropertyOptional({ description: 'User language', type: String })
@IsOptional() @IsOptional()