Skip to content

Commit

Permalink
HotFix: 시니또용 카테고리별 가이드라인 조회 검증 로직 수정 (#221)
Browse files Browse the repository at this point in the history
fix: 시니또용 카테고리별 가이드라인 조회 검증 로직 수정
  • Loading branch information
eunsoni authored Nov 12, 2024
1 parent d1d9211 commit 21e0988
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ public List<GuardGuidelineResponse> readAllGuardGuidelinesByCategoryAndCallback(
Callback callback = callbackRepository.findById(callbackId)
.orElseThrow(() -> new NotFoundException("존재하지 않는 콜백입니다"));

if (callback.getStatus() != Callback.Status.WAITING.name() && callback.getAssignedMemberId() != memberId) {
throw new BadRequestException("해당 콜백은 대기 상태가 아니고, 배정 시니또가 아닙니다.");
if (!callback.getStatus().equals(Callback.Status.WAITING.name()) && !callback.getAssignedMemberId().equals(memberId)) {
throw new BadRequestException("해당 콜백은 대기 상태가 아니고, 배정된 시니또가 아닙니다.");
}

Long seniorId = callback.getSeniorId();
List<GuardGuideline> guardGuidelines = guardGuidelineRepository.findBySeniorIdAndType(seniorId, type);

Expand Down

0 comments on commit 21e0988

Please sign in to comment.