fix: reset password bug.

This commit is contained in:
a.bouhuolia
2020-12-17 18:58:21 +02:00
parent 56a4a5638f
commit 82c2b6b0f3
2 changed files with 4 additions and 1 deletions

View File

@@ -279,7 +279,7 @@ export default class AuthenticationService implements IAuthenticationService {
const hashedPassword = await hashPassword(password);
this.logger.info('[reset_password] saving a new hashed password.');
await systemUserRepository.edit(user.id, { password: hashedPassword });
await systemUserRepository.update({ password: hashedPassword }, { id: user.id });
// Deletes the used token.
await this.deletePasswordResetToken(tokenModel.email);