[3주차] 변승현/[feat] 게시글 도메인 API 구현#92
Hidden character warning
[3주차] 변승현/[feat] 게시글 도메인 API 구현#92gusanans218 wants to merge 7 commits intoLeets-Official:변승현/mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 244395bfa0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
src/main/java/com/example/demo/global/exception/GlobalExceptionHandler.java
Show resolved
Hide resolved
Hanharam
left a comment
There was a problem hiding this comment.
👍 DTO, Service에서 검증하신 점이 좋았습니다. 전체적인 흐름도 좋습니다! PostQueryService와 PostCommandService로 분리, 에러 코드를 enum으로 관리하는 것도 고려해보시면 좋을 것 같습니다!
N-yujeong
left a comment
There was a problem hiding this comment.
👍 전체적으로 과제 요구사항을 잘 반영하여 구현하신 것 같습니다.
특히 GlobalExceptionHandler를 통해 예외 처리를 공통화한 부분이 인상적이었습니다.
jihoonkim501
left a comment
There was a problem hiding this comment.
승현님 수고많으셨습니다~! 커스텀 예외처리가 눈에 띄게 잘 짜신 것 같습니다! 제 코멘트 한번만 확인 부탁 드립니다~!
| @RequestParam(defaultValue = "0") @Min(value = 0, message = "페이지 번호는 0 이상이어야 합니다.") int page, | ||
| @RequestParam(defaultValue = "10") @Min(value = 1, message = "페이지 크기는 1 이상이어야 합니다.") int size |
There was a problem hiding this comment.
이미 알고 계시겠지만 이 부분은 DTO에서 검증할 수 있습니다~! 컨트롤러단에서는 요청을 받고 보내는 역할로 두는것을 추천드립니다~!
| public record PostDeleteRequest( | ||
| @NotNull(message = "userId는 필수입니다.") | ||
| Long userId | ||
| ) { |
There was a problem hiding this comment.
게시글 삭제하는데 유저아이디로만 삭제하고 있습니다! PostId를 추가로 받아서 선택삭제하는 방법을 의도하신거라면 postId가 필요해보입니다!
| Long postId, | ||
| String title, | ||
| String content, | ||
| String imageUrl, |
There was a problem hiding this comment.
확장성을 고려하여 List 을 이용하여 2개 이상 이미지를 응답으로 보내는것도 고려해보시면 좋을 것 같습니다!
1. 과제 요구사항 중 구현한 내용
2. 핵심 변경 사항
3. 실행 및 검증 결과
4. 완료 사항
5. 추가 사항
제출 체크리스트
{이름}/main브랜치다{이름}/{숫자}주차브랜치다