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

특정 사용자가 작성한 리뷰 목록 조회 API 추가 #107

Merged
merged 7 commits into from
Jan 11, 2024

Conversation

feel-coding
Copy link
Member

🎯 Issue

🔑 Key Changes

  • 특정 사용자가 작성한 리뷰 목록을 조회하는 API를 추가했습니다.
  • 테스트 코드를 작성했습니다.
  • 문서를 작성했습니다.

@feel-coding feel-coding requested a review from chaewss November 12, 2023 14:33
@feel-coding feel-coding self-assigned this Nov 12, 2023
@chaewss chaewss linked an issue Nov 13, 2023 that may be closed by this pull request
3 tasks
* @param userId 사용자 ID
* @param sortBy 정렬 정보
* @param pageable 페이지 정보
* @return 리뷰 목록
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* @return 리뷰 목록
* @return 리뷰 목록
* @throws ForbiddenException 정회원이 아닌 회원이 0페이지가 아닌 다른 페이지를 조회하는 경우
* @throws NotFoundException 해당 회원이 존재하지 않는 경우

Copy link
Member Author

Choose a reason for hiding this comment

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

@chaewss 수정했습니다~

Comment on lines 205 to 211
if (loginUser == null || loginUser.getRole() != Role.REGULAR) {
if (pageable.getPageNumber() > 0) {
throw FORBIDDEN_REVIEW;
} else {
pageable = PageRequest.of(pageable.getPageNumber(), 5);
}
}
Copy link
Member

Choose a reason for hiding this comment

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

해당 부분은 특정 상품 리뷰 목록 조회 API에서도 사용하는 로직이라 모듈화하는건 어떻게 생각하세요?

Copy link
Member Author

Choose a reason for hiding this comment

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

@chaewss 좋은 생각인 것 같아요. 수정했습니다!

@@ -362,7 +362,25 @@ include::{snippets}/review-controller-test/respond_200_when_success_to_read_prod
==== Sample Response
include::{snippets}/review-controller-test/respond_200_when_success_to_read_product_reviews/http-response.adoc[]

=== 4-5. 리뷰 좋아요 추가
=== 4-5. 특정 사용자의 리뷰 목록 조회
Copy link
Member

Choose a reason for hiding this comment

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

저는 특정 회원의 값을 조회하는 api들은 1. 회원 부분에 넣었는데 이 부분 상의해보면 좋을 것 같아요~

Copy link
Member

@chaewss chaewss left a comment

Choose a reason for hiding this comment

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

고생하셨어요👍

@chaewss chaewss merged commit 82e4371 into develop Jan 11, 2024
1 check passed
@chaewss chaewss deleted the feature#82 branch January 11, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

특정 회원이 작성한 리뷰 목록 조회
2 participants