Skip to content

Commit cd818d4

Browse files
committed
feat: add resume review file upload and retrieval endpoints to mentorship controller:
-Post -> ("/{resumeReviewId}/file") -Get -> ("/{resumeReviewId}/file") -Get -> ("/{resumeReviewId}")
1 parent 2db64c1 commit cd818d4

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

apps/jobboard-backend/src/main/java/org/bounswe/jobboardbackend/mentorship/controller/MentorshipController.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.springframework.security.access.prepost.PreAuthorize;
1111
import org.springframework.security.core.Authentication;
1212
import org.springframework.web.bind.annotation.*;
13+
import org.springframework.web.multipart.MultipartFile;
1314

1415
import java.util.List;
1516

@@ -21,6 +22,32 @@ public class MentorshipController {
2122

2223
private final MentorshipService mentorshipService;
2324

25+
@PostMapping("/{resumeReviewId}/file")
26+
public ResponseEntity<ResumeFileResponseDTO> uploadResumeFile(
27+
@PathVariable Long resumeReviewId,
28+
@RequestPart("file") MultipartFile file
29+
) {
30+
ResumeFileResponseDTO dto = mentorshipService.uploadResumeFile(resumeReviewId, file);
31+
return ResponseEntity.ok(dto);
32+
}
33+
34+
@GetMapping("/{resumeReviewId}/file")
35+
public ResponseEntity<ResumeFileUrlDTO> getResumeFileUrl(
36+
@PathVariable Long resumeReviewId
37+
) {
38+
ResumeFileUrlDTO dto = mentorshipService.getResumeFileUrl(resumeReviewId);
39+
return ResponseEntity.ok(dto);
40+
}
41+
42+
@GetMapping("/{resumeReviewId}")
43+
public ResponseEntity<ResumeReviewDTO> getResumeReview(
44+
@PathVariable Long resumeReviewId
45+
) {
46+
ResumeReviewDTO dto = mentorshipService.getResumeReview(resumeReviewId);
47+
return ResponseEntity.ok(dto);
48+
}
49+
50+
2451
@GetMapping
2552
public ResponseEntity<List<MentorProfileDetailDTO>> searchMentors() {
2653
List<MentorProfileDetailDTO> mentors = mentorshipService.searchMentors();

0 commit comments

Comments
 (0)