res dto
This commit is contained in:
2
backend/dist/users/users.service.js
vendored
2
backend/dist/users/users.service.js
vendored
@@ -39,7 +39,7 @@ let UsersService = class UsersService {
|
||||
async changePassword(userId, dto) {
|
||||
const user = await this.repo.findOne({ where: { id: userId } });
|
||||
if (!user)
|
||||
throw new common_1.NotFoundException("Not existed user");
|
||||
throw new common_1.NotFoundException("User not found");
|
||||
const passwordValid = await bcrypt.compare(dto.currentPassword, user.password);
|
||||
if (!passwordValid)
|
||||
throw new common_1.BadRequestException("Not matched password");
|
||||
|
Reference in New Issue
Block a user