Skip to content

Commit

Permalink
Fix [#10] 코드리뷰 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
chaentopia committed May 20, 2024
1 parent a83f13e commit 8fe9af2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
import java.net.URI;

@RestController
@RequestMapping("/api/v1/resumes")
@RequestMapping("/api/v1")
@RequiredArgsConstructor
public class ResumeController {
private final ResumeService resumeService;

@PostMapping
public ResponseEntity<SuccessResponse> createResume (
@PostMapping("/resumes")
public ResponseEntity<SuccessResponse<Void>> createResume (
@RequestBody ResumeCreateRequest resumeCreateRequest
) {
resumeService.createResume(resumeCreateRequest);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import lombok.RequiredArgsConstructor;
import org.sopt.jumpit.global.common.dto.message.ErrorMessage;
import org.sopt.jumpit.global.exception.BusinessException;
import org.sopt.jumpit.global.exception.NotFoundException;
import org.sopt.jumpit.resume.domain.Resume;
import org.sopt.jumpit.resume.dto.ResumeCreateRequest;
import org.sopt.jumpit.resume.repository.ResumeRepository;
Expand All @@ -22,7 +23,7 @@ public void createResume(
ResumeCreateRequest resumeCreateRequest
) {
User findUser = userRepository.findById(resumeCreateRequest.userId()).orElseThrow(
() -> new BusinessException(ErrorMessage.USER_NOT_FOUND_BY_ID_EXCEPTION)
() -> new NotFoundException(ErrorMessage.USER_NOT_FOUND_BY_ID_EXCEPTION)
);
Resume resume = Resume.create(findUser, "내 이력서");
resumeRepository.save(resume);
Expand Down

0 comments on commit 8fe9af2

Please sign in to comment.