Skip to content

Commit 4be34dc

Browse files
committed
fix(volunteer-apply): 특정 모집글 봉사자 지원 단건 조회 버그 해결
- 지원 내역이 없는 경우 210 반환
1 parent 34a2ede commit 4be34dc

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

src/main/java/com/somemore/domains/volunteerapply/controller/VolunteerApplyQueryApiController.java

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.somemore.domains.volunteerapply.controller;
22

3-
import static org.springframework.data.domain.Sort.Direction.DESC;
4-
3+
import com.somemore.domains.volunteerapply.domain.ApplyStatus;
54
import com.somemore.domains.volunteerapply.dto.condition.VolunteerApplySearchCondition;
65
import com.somemore.domains.volunteerapply.dto.response.VolunteerApplyRecruitInfoResponseDto;
76
import com.somemore.domains.volunteerapply.dto.response.VolunteerApplySummaryResponseDto;
@@ -10,21 +9,19 @@
109
import com.somemore.domains.volunteerapply.usecase.VolunteerApplyQueryUseCase;
1110
import com.somemore.global.auth.annotation.CurrentUser;
1211
import com.somemore.global.common.response.ApiResponse;
13-
import com.somemore.global.exception.BadRequestException;
14-
import com.somemore.domains.volunteerapply.domain.ApplyStatus;
12+
import com.somemore.global.exception.NoSuchElementException;
1513
import io.swagger.v3.oas.annotations.Operation;
1614
import io.swagger.v3.oas.annotations.tags.Tag;
17-
import java.util.UUID;
1815
import lombok.RequiredArgsConstructor;
1916
import org.springframework.data.domain.Page;
2017
import org.springframework.data.domain.Pageable;
2118
import org.springframework.data.web.PageableDefault;
2219
import org.springframework.security.access.annotation.Secured;
23-
import org.springframework.web.bind.annotation.GetMapping;
24-
import org.springframework.web.bind.annotation.PathVariable;
25-
import org.springframework.web.bind.annotation.RequestMapping;
26-
import org.springframework.web.bind.annotation.RequestParam;
27-
import org.springframework.web.bind.annotation.RestController;
20+
import org.springframework.web.bind.annotation.*;
21+
22+
import java.util.UUID;
23+
24+
import static org.springframework.data.domain.Sort.Direction.DESC;
2825

2926
@Tag(name = "Volunteer Apply Query API", description = "봉사 활동 지원 조회 API")
3027
@RequiredArgsConstructor
@@ -48,7 +45,7 @@ public ApiResponse<?> getVolunteerApplyByRecruitIdAndVolunteerId(
4845
recruitBoardId, volunteerId),
4946
"특정 모집글에 대한 봉사자 지원 단건 조회 성공"
5047
);
51-
} catch (BadRequestException e) {
48+
} catch (NoSuchElementException e) {
5249
return ApiResponse.ok(210, "지원 내역이 없습니다.");
5350
}
5451
}

0 commit comments

Comments
 (0)