7주차 미션 [워니]#15
Open
ywkim1m wants to merge 13 commits into
Open
Conversation
Collaborator
|
미션 수고하셨습니다! |
yangjiae12
reviewed
May 18, 2026
|
|
||
| return CursorPageResponse.<ReviewResDTO.MyReviewResponse>builder() | ||
| .content(content) | ||
| .hasNext(reviews.size() == size) |
Member
There was a problem hiding this comment.
조회 결과가 size와 같다고 해서 항상 다음 페이지가 있는 것은 아니므로, size + 1개 조회하거나 Slice를 사용해 hasNext를 판단하면 더 정확할 것 같습니다.
| Pageable pageable = PageRequest.of(0, size); | ||
| List<Review> reviews; | ||
|
|
||
| if ("SCORE".equalsIgnoreCase(sort)) { |
Member
There was a problem hiding this comment.
잘못된 sort 값도 id 정렬로 처리될 수 있어, 허용된 정렬값인지 검증하면 API 동작이 더 명확할 것 같습니다.
yangjiae12
reviewed
May 18, 2026
| @RestController | ||
| @RequiredArgsConstructor | ||
| @RequestMapping("/reviews") | ||
| public class ReviewController { |
Member
There was a problem hiding this comment.
리뷰 작성 외의 다른 API도 컨트롤러까지 작성해주세요!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 구현 결과
1. 내가 진행중인 미션 조회 API 구현
2. 내가 작성한 리뷰 조회 API 구현
3. 가게 미션 생성 및 조회 API 구현
4. Request Body 검증 로직 추가
ReviewReqDTO(추가 필요)
SignUpReqDTO(추가 필요)
위 DTO들에 검증 어노테이션 추가
@NotBlank@NotNull@Min@Future@Size적용 및 커스텀 메시지 설정
5. 전역 예외 처리 추가
GeneralExceptionAdvice에 MethodArgumentNotValidException 핸들러 추가
검증 실패 시 field명 + 실패 이유를 Map 형태로 응답하도록 수정
❓ 리뷰 요청
🤔 질문
💬 기타 공유 사항
진행중 미션 조회
리뷰 조회