|
25 | 25 | import org.springframework.http.ResponseEntity; |
26 | 26 | import org.springframework.security.core.annotation.AuthenticationPrincipal; |
27 | 27 | import org.springframework.security.core.userdetails.UserDetails; |
28 | | -import org.springframework.web.bind.annotation.DeleteMapping; |
29 | | -import org.springframework.web.bind.annotation.PostMapping; |
30 | | -import org.springframework.web.bind.annotation.RequestBody; |
31 | | -import org.springframework.web.bind.annotation.RestController; |
| 28 | +import org.springframework.web.bind.annotation.*; |
32 | 29 |
|
33 | 30 | @Tag(name = "Auth", description = "Auth API") |
34 | 31 | @RestController |
@@ -155,4 +152,27 @@ public ResponseEntity<IntermediaryEmailWithAuthResponse> sendEmailToIntermediary |
155 | 152 | return ResponseEntity.ok(response); |
156 | 153 | } |
157 | 154 |
|
| 155 | + @Operation(summary = "이동봉사자 - 탈퇴 - 승인 대기중, 진행중 공고 존재 여부 확인", description = "승인 대기중, 진행중 공고 존재 여부를 확인합니다.", |
| 156 | + responses = {@ApiResponse(responseCode = "200", description = "승인 대기중, 진행중 공고 존재 여부 확인 성공") |
| 157 | + , @ApiResponse(responseCode = "400" |
| 158 | + , description = "M1, 해당 이동봉사자를 찾을 수 없습니다." |
| 159 | + , content = @Content(schema = @Schema(implementation = ErrorResponse.class))) |
| 160 | + }) |
| 161 | + @GetMapping( "/volunteers/my/check") |
| 162 | + public ResponseEntity<Boolean> checkVolunteerWithdraw(@AuthenticationPrincipal UserDetails loginUser) { |
| 163 | + Boolean response = authService.checkVolunteerWithdraw(loginUser.getUsername()); |
| 164 | + return ResponseEntity.ok(response); |
| 165 | + } |
| 166 | + |
| 167 | + @Operation(summary = "중개자 - 탈퇴 - 승인 대기중, 진행중 공고 존재 여부 확인", description = "승인 대기중, 진행중 공고 존재 여부를 확인합니다.", |
| 168 | + responses = {@ApiResponse(responseCode = "200", description = "승인 대기중, 진행중 공고 존재 여부 확인 성공") |
| 169 | + , @ApiResponse(responseCode = "400" |
| 170 | + , description = "M2, 해당 이동봉사 중개를 찾을 수 없습니다." |
| 171 | + , content = @Content(schema = @Schema(implementation = ErrorResponse.class))) |
| 172 | + }) |
| 173 | + @GetMapping( "/intermediaries/my/check") |
| 174 | + public ResponseEntity<Boolean> checkIntermediaryWithdraw(@AuthenticationPrincipal UserDetails loginUser) { |
| 175 | + Boolean response = authService.checkIntermediaryWithdraw(loginUser.getUsername()); |
| 176 | + return ResponseEntity.ok(response); |
| 177 | + } |
158 | 178 | } |
0 commit comments