This commit is contained in:
2025-07-17 17:22:10 +09:00
parent 8135650344
commit bf8c75f770
12 changed files with 37 additions and 11 deletions

View File

@@ -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");