Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: 동행구하기 API 리팩토링 #85

Merged
merged 7 commits into from
Sep 18, 2024
Merged

refactor: 동행구하기 API 리팩토링 #85

merged 7 commits into from
Sep 18, 2024

Conversation

chaechaen
Copy link
Member

📝작업 내용 / 스크린샷

  • ResponseDTO에 from 메서드 추가
  • UserDetails에서 User 객체를 가져오도록 수정
  • Response Entity 응답 상태코드 ok로 통일
  • GlobalExceptionHandler로 예외처리 수정
  • 동행글 조회 시 paging 추가

Copy link
Contributor

@ri-naa ri-naa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

변경사항 모두 확인했습니다!

CompanyPost companyPost = companyPostRepository.findById(companyPostId)
.orElseThrow(() -> new RuntimeException("게시글을 찾을 수 없습니다. ID: " + companyPostId));
.orElseThrow(() -> new BadRequestException(ResponseCode.ROW_DOES_NOT_EXIST, "게시글을 찾을 수 없습니다. ID: " + companyPostId));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

예외처리 잘 적용된 것 같네요!!
수고하셨습니다 :)

Copy link
Contributor

@isuHan isuHan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

변경 내용 전체 확인했습니다!👍🏻

Copy link
Contributor

@ri-naa ri-naa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

페이징 부분 코드리뷰 하나 추가로 남겨놨습니다!!

@RequestParam(required = false) LocalDate startDate,
@RequestParam(required = false) LocalDate endDate,
@RequestParam(required = false) Gender gender,
@RequestParam(required = false) String country,
@AuthenticationPrincipal UserDetails userDetails) {
Pageable pageable) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분 @ParameterObject Pageable pageable로 하면 더 좋을 것 같습니다!!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

감사합니다 수정했습니다!!👍

@isuHan isuHan merged commit 4117f14 into main Sep 18, 2024
2 checks passed
@ri-naa ri-naa changed the title [Refactor] 동행구하기 API 리팩토링 refactor: 동행구하기 API 리팩토링 Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants