Skip to content

Commit

Permalink
[PDS-213] fix: 예외처리 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
chaerlo127 committed Nov 30, 2023
1 parent 24ab9f3 commit 4b5b739
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ public ResponsibilityListRes getResponsibilityList(String name) {
}
// 직원 접근 탈퇴
public void resignUser(User user) {
// 탈퇴하려는 회원이 장비, 차량 관리자인 경우 애러처리
// 탈퇴하려는 회원이 장비, 차량, 비품 관리자인 경우 애러처리
if (resourceRepository.existsByUserAndIsEnable(user, true)) throw new BaseException(EXISTS_RESOURCE_ADMIN_USER);
if (carRepository.existsByUserAndIsEnable(user, true)) throw new BaseException(EXISTS_CAR_ADMIN_USER);
if (equipmentRepository.existsByUserAndIsEnable(user, true)) throw new BaseException(EXISTS_CAR_ADMIN_USER);
if (equipmentRepository.existsByUserAndIsEnable(user, true)) throw new BaseException(EXISTS_EQUIPMENT_ADMIN_USER);
jwtUtil.deleteRefreshToken(user.getUserId());
userRepository.delete(user);
}
Expand Down

0 comments on commit 4b5b739

Please sign in to comment.