Remove error when new_psw==old_psw (#3637)
This commit is contained in:
@ -259,10 +259,6 @@ export class AuthService {
|
|||||||
|
|
||||||
assert(isPasswordValid, 'Password too weak', BadRequestException);
|
assert(isPasswordValid, 'Password too weak', BadRequestException);
|
||||||
|
|
||||||
const isPasswordSame = await compareHash(newPassword, user.passwordHash);
|
|
||||||
|
|
||||||
assert(!isPasswordSame, 'Password cannot be repeated', BadRequestException);
|
|
||||||
|
|
||||||
const newPasswordHash = await hashPassword(newPassword);
|
const newPasswordHash = await hashPassword(newPassword);
|
||||||
|
|
||||||
await this.userRepository.update(userId, {
|
await this.userRepository.update(userId, {
|
||||||
|
|||||||
Reference in New Issue
Block a user