coments
This commit is contained in:
@@ -18,7 +18,7 @@ export class AuthService {
|
||||
) {}
|
||||
|
||||
async register(data: registerDto){
|
||||
const{username, password,} = data;
|
||||
const{password,} = data;
|
||||
|
||||
//Seeks the password and if it finds it, it doesn't register
|
||||
if(await this.usersService.findOne(data.username)){
|
||||
|
||||
@@ -2,10 +2,11 @@ import { IsEmail, IsNotEmpty, IsString, MinLength } from "class-validator";
|
||||
|
||||
export class CreateUserDto{
|
||||
@IsString()
|
||||
readonly name: string;
|
||||
|
||||
@IsNotEmpty()
|
||||
@MinLength(10)
|
||||
readonly password: string;
|
||||
name: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
password: string;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user