This commit is contained in:
IO
2024-06-12 21:26:05 -06:00
parent e61268a66a
commit 197dcc66ef
2 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -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)){
+5 -4
View File
@@ -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;
}