Encriptación en el registro del administrador del sistema

This commit is contained in:
Traym17 2022-07-10 22:21:52 -06:00
parent 6668c43afc
commit fd98551f47
1 changed files with 2 additions and 0 deletions

View File

@ -11,6 +11,8 @@ export class UsersService {
) {} ) {}
private publicKey: string; private publicKey: string;
async create(user: UserDocument): Promise<User> { async create(user: UserDocument): Promise<User> {
let passwordEncriptada=Md5.init(user.password);
user.password=passwordEncriptada;
return this.userModel.create(user); return this.userModel.create(user);
} }