Implementar modulo de Auth

This commit is contained in:
2026-06-03 20:07:39 +00:00
parent c6f3f3d135
commit d9584c2861
9 changed files with 171 additions and 16 deletions

View File

@ -1,3 +1,4 @@
import bcrypt from "bcrypt";
import userModel from "./user.model";
export class UserService {
@ -20,6 +21,13 @@ export class UserService {
async create(
data:any
) {
const passwordHash = await bcrypt.hash(
data.passwordHash,
10
);
data.passwordHash = passwordHash;
return await userModel.create(data);
}