From 72df8e473dd470e894e9053f8df1f4d636ff4589 Mon Sep 17 00:00:00 2001 From: sdraris Date: Mon, 22 Sep 2025 12:00:34 +0200 Subject: [PATCH] hashage corrected --- src/routes/auth/auth.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/auth/auth.service.ts b/src/routes/auth/auth.service.ts index 406eb78..2c6a67c 100644 --- a/src/routes/auth/auth.service.ts +++ b/src/routes/auth/auth.service.ts @@ -111,8 +111,9 @@ export class AuthService { } } + const salt = await bcrypt.genSalt(10); + registerDto.password = await bcrypt.hash(registerDto.password, salt); const user = await this.usersService.createUser(registerDto); - const tokens = await this.generateTokens(user.id, user.email, user.role); return {