feat: Change auth flow
This commit is contained in:
@@ -2,39 +2,9 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import {
|
||||
IsEmail,
|
||||
IsNotEmpty,
|
||||
IsOptional,
|
||||
IsString,
|
||||
MinLength,
|
||||
} from 'class-validator';
|
||||
|
||||
export class RegisterUserRequestDTO {
|
||||
@ApiProperty({
|
||||
description: "User's firstName",
|
||||
example: 'John',
|
||||
type: 'string',
|
||||
})
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
firstName: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description: "User's middleName",
|
||||
example: 'Kumar',
|
||||
type: 'string',
|
||||
})
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
middleName?: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: "User's lastName",
|
||||
example: 'Doe',
|
||||
type: 'string',
|
||||
})
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
lastName: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: "User's email",
|
||||
example: 'user@example.com',
|
||||
@@ -43,15 +13,4 @@ export class RegisterUserRequestDTO {
|
||||
@IsEmail()
|
||||
@IsNotEmpty()
|
||||
email: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: "User's password",
|
||||
example: '123456',
|
||||
type: 'string',
|
||||
minLength: 6,
|
||||
})
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@MinLength(6)
|
||||
password: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user