Skip to content

Commit cf08d92

Browse files
committed
feat(volunteer-apply): 봉사 활동 지원 거절 API
1 parent b4e245f commit cf08d92

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/main/java/com/somemore/volunteerapply/controller/CenterVolunteerApplyCommandApiController.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.somemore.auth.annotation.CurrentUser;
44
import com.somemore.global.common.response.ApiResponse;
55
import com.somemore.volunteerapply.usecase.ApproveVolunteerApplyUseCase;
6+
import com.somemore.volunteerapply.usecase.RejectVolunteerApplyUseCase;
67
import io.swagger.v3.oas.annotations.Operation;
78
import io.swagger.v3.oas.annotations.tags.Tag;
89
import java.util.UUID;
@@ -20,6 +21,7 @@
2021
public class CenterVolunteerApplyCommandApiController {
2122

2223
private final ApproveVolunteerApplyUseCase approveVolunteerApplyUseCase;
24+
private final RejectVolunteerApplyUseCase rejectVolunteerApplyUseCase;
2325

2426
@Secured("ROLE_CENTER")
2527
@Operation(summary = "봉사 활동 지원 승인", description = "봉사 활동 지원을 승인합니다.")
@@ -33,4 +35,16 @@ public ApiResponse<String> approve(
3335
return ApiResponse.ok("봉사 활동 지원 승인 성공");
3436
}
3537

38+
@Secured("ROLE_CENTER")
39+
@Operation(summary = "봉사 활동 지원 거절", description = "봉사 활동 지원을 거절합니다.")
40+
@PatchMapping("/volunteer-apply/{id}/reject")
41+
public ApiResponse<String> reject(
42+
@CurrentUser UUID centerId,
43+
@PathVariable Long id
44+
) {
45+
46+
rejectVolunteerApplyUseCase.reject(id, centerId);
47+
return ApiResponse.ok("봉사 활동 지원 거절 성공");
48+
}
49+
3650
}

0 commit comments

Comments
 (0)