fix: align admin profile request validation
This commit is contained in:
@@ -7,20 +7,21 @@ import {
|
||||
Max,
|
||||
MaxLength,
|
||||
Min,
|
||||
ValidateIf,
|
||||
} from 'class-validator';
|
||||
import { RoleEnum } from '../../roles/roles.enum';
|
||||
import { StatusEnum } from '../../statuses/statuses.enum';
|
||||
|
||||
export class AdminUserProfileDto {
|
||||
@IsOptional()
|
||||
@ValidateIf((_, value) => value !== undefined)
|
||||
@IsString()
|
||||
@MaxLength(255)
|
||||
firstName?: string | null;
|
||||
firstName?: string;
|
||||
|
||||
@IsOptional()
|
||||
@ValidateIf((_, value) => value !== undefined)
|
||||
@IsString()
|
||||
@MaxLength(255)
|
||||
lastName?: string | null;
|
||||
lastName?: string;
|
||||
}
|
||||
|
||||
export class AdminUserRoleDto {
|
||||
|
||||
Reference in New Issue
Block a user