Merge pull request #91 from DeimosPr4/UH-registroAdminSistema

Encriptación en el registro del administrador del sistema
This commit is contained in:
Traym17 2022-07-10 22:37:08 -06:00 committed by GitHub
commit 8f537f9c4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);
} }