Add password login, set-password, business images migration, and user serialization.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, MaxLength, MinLength } from 'class-validator';
|
||||
import { IsIranMobile } from '../../../common/decorators/is-iran-mobile.decorator';
|
||||
|
||||
export class LoginPasswordDto {
|
||||
@ApiProperty({ example: '09122222222' })
|
||||
@IsIranMobile()
|
||||
mobile!: string;
|
||||
|
||||
@ApiProperty({ example: 'mySecurePass123' })
|
||||
@IsString()
|
||||
@MinLength(1)
|
||||
@MaxLength(72)
|
||||
password!: string;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { IsOptional, IsString, MaxLength, MinLength } from 'class-validator';
|
||||
|
||||
export class SetPasswordDto {
|
||||
@ApiPropertyOptional({ description: 'Required when changing an existing password' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(72)
|
||||
currentPassword?: string;
|
||||
|
||||
@ApiProperty({ example: 'mySecurePass123', minLength: 8 })
|
||||
@IsString()
|
||||
@MinLength(8)
|
||||
@MaxLength(72)
|
||||
password!: string;
|
||||
|
||||
@ApiProperty({ example: 'mySecurePass123' })
|
||||
@IsString()
|
||||
@MinLength(8)
|
||||
@MaxLength(72)
|
||||
confirmPassword!: string;
|
||||
}
|
||||
Reference in New Issue
Block a user