update : password

This commit is contained in:
morteza-mortezai
2025-11-12 09:16:37 +03:30
parent 0aec555ff0
commit b3f6ce05c5
3 changed files with 21707 additions and 7 deletions
+2 -2
View File
@@ -196,8 +196,8 @@ export class AuthService {
async changePassword(userId: string, updateDto: ChangePasswordDto) {
const { user } = await this.usersService.findOneById(userId);
const passCompare = await this.passwordService.comparePassword(updateDto.password, user.password);
if (!passCompare) throw new BadRequestException(AuthMessage.CURRENT_PASSWORD_INVALID);
// const passCompare = await this.passwordService.comparePassword(updateDto.password, user.password);
// if (!passCompare) throw new BadRequestException(AuthMessage.CURRENT_PASSWORD_INVALID);
if (updateDto.newPassword !== updateDto.repeatPassword) throw new BadRequestException(AuthMessage.INVALID_REAPET_PASSWORD);