MSP-3427 fixed typo

This commit is contained in:
Tim committed 2024-06-13 18:20:01 +03:00
1 parent fb0a08ea13
commit 7d60f6d51d
1 file changed
+3 -3
+3 -3
View File
@@ -469,9 +469,9 @@ func (u User) ChangePassword(ctx context.Context, adminId int64, oldPassword str
return domain.ErrInvalidPassword
}
encryptedPassword, errOld := u.cryptPassword(newPassword)
if errOld != nil {
return errors.WithMessage(errOld, "user.service.ChangePassword: crypt old password")
encryptedPassword, errNew := u.cryptPassword(newPassword)
if errNew != nil {
return errors.WithMessage(errNew, "user.service.ChangePassword: crypt new password")
}
err = u.userRepo.ChangePassword(ctx, adminId, encryptedPassword)