correction for generic users
This commit is contained in:
@@ -25,15 +25,15 @@ export class CreateUserDto {
|
||||
|
||||
@ApiProperty({ example: 'Julien' })
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@IsOptional()
|
||||
@MaxLength(100)
|
||||
first_name: string;
|
||||
first_name?: string;
|
||||
|
||||
@ApiProperty({ example: 'Dupont' })
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@IsOptional()
|
||||
@MaxLength(100)
|
||||
last_name: string;
|
||||
last_name?: string;
|
||||
|
||||
@ApiProperty({ enum: GenreType, required: false, default: GenreType.AUTRE })
|
||||
@IsOptional()
|
||||
@@ -51,14 +51,27 @@ export class CreateUserDto {
|
||||
|
||||
@ApiProperty({ example: '+33123456789' })
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@IsOptional()
|
||||
@MaxLength(20)
|
||||
phone: string;
|
||||
phone?: string;
|
||||
|
||||
@ApiProperty({ example: 'Paris', required: false })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(150)
|
||||
city?: string;
|
||||
|
||||
@ApiProperty({ example: '75000', required: false })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(10)
|
||||
postal_code?: string;
|
||||
|
||||
|
||||
@ApiProperty({ example: '10 rue de la paix, 75000 Paris' })
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
address: string;
|
||||
@IsOptional()
|
||||
address?: string;
|
||||
|
||||
@ApiProperty({ example: 'https://example.com/photo.jpg', required: false })
|
||||
@IsOptional()
|
||||
@@ -72,8 +85,8 @@ export class CreateUserDto {
|
||||
|
||||
@ApiProperty({ required: false })
|
||||
@IsOptional()
|
||||
@IsDateString()
|
||||
consent_photo_at?: string;
|
||||
@IsDateString({}, { message: 'consent_photo_at doit être une date ISO valide' })
|
||||
consent_photo_at?: string | null;
|
||||
|
||||
@ApiProperty({ default: false })
|
||||
@IsOptional()
|
||||
|
||||
Reference in New Issue
Block a user