Skip to content

Commit 8584f34

Browse files
committed
feat: 부원 지원 엔드포인트 추가
1 parent 1ee96e2 commit 8584f34

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package dmu.dasom.api.domain.recruit.controller;
2+
3+
import dmu.dasom.api.domain.applicant.dto.ApplicantCreateRequestDto;
4+
import dmu.dasom.api.domain.applicant.service.ApplicantService;
5+
import io.swagger.v3.oas.annotations.Operation;
6+
import io.swagger.v3.oas.annotations.responses.ApiResponse;
7+
import io.swagger.v3.oas.annotations.responses.ApiResponses;
8+
import jakarta.validation.Valid;
9+
import lombok.RequiredArgsConstructor;
10+
import org.springframework.http.ResponseEntity;
11+
import org.springframework.web.bind.annotation.PostMapping;
12+
import org.springframework.web.bind.annotation.RequestBody;
13+
import org.springframework.web.bind.annotation.RequestMapping;
14+
import org.springframework.web.bind.annotation.RestController;
15+
16+
@RestController
17+
@RequestMapping("/api/recruit")
18+
@RequiredArgsConstructor
19+
public class RecruitController {
20+
21+
private final ApplicantService applicantService;
22+
23+
// 지원하기
24+
@Operation(summary = "부원 지원하기")
25+
@ApiResponses(value = {
26+
@ApiResponse(responseCode = "200", description = "지원 성공")
27+
})
28+
@PostMapping("/apply")
29+
public ResponseEntity<Void> apply(@Valid @RequestBody final ApplicantCreateRequestDto request) {
30+
applicantService.apply(request);
31+
return ResponseEntity.ok().build();
32+
}
33+
34+
}

0 commit comments

Comments
 (0)