Skip to content

Commit f7ce9bc

Browse files
committed
fix: admin update user password
1 parent 794c499 commit f7ce9bc

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

src/user/dto/reset-password.dto.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/user/user.controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ export class UserController {
518518
});
519519
}
520520

521-
if (user.password && !this.userService.checkPassword(user.password, dto.oldPassword)) {
521+
if (dto.oldPassword && !this.userService.checkPassword(user.password, dto.oldPassword)) {
522522
throw new BadRequestException({
523523
code: ErrorCodes.WRONG_OLD_PASSWORD,
524524
message: 'Old password not match.',

0 commit comments

Comments
 (0)