Phase 1 complete
This commit is contained in:
27
apps/backend/src/user/dto/update-user.dto.ts
Normal file
27
apps/backend/src/user/dto/update-user.dto.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { IsString, IsEmail, MinLength, IsOptional } from 'class-validator';
|
||||
import { ApiPropertyOptional } from '@nestjs/swagger';
|
||||
|
||||
export class UpdateUserDto {
|
||||
@ApiPropertyOptional({ description: 'New email address', example: 'newemail@example.com' })
|
||||
@IsOptional()
|
||||
@IsEmail()
|
||||
email?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'New username', example: 'newusername' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MinLength(3)
|
||||
username?: string;
|
||||
}
|
||||
|
||||
export class UpdatePasswordDto {
|
||||
@ApiPropertyOptional({ description: 'Current password', example: 'oldpassword123' })
|
||||
@IsString()
|
||||
@MinLength(6)
|
||||
currentPassword: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'New password', example: 'newpassword123' })
|
||||
@IsString()
|
||||
@MinLength(6)
|
||||
newPassword: string;
|
||||
}
|
||||
Reference in New Issue
Block a user