Conversation
|
4주차 개발도 수고 많으셨습니다 ! |
|
|
||
| // 게시글 작성 | ||
| @PostMapping | ||
| public ResponseEntity<Map<String, Object>> create(@Valid @RequestBody PostCreateRequest request) { |
| private final ReportService reportService; | ||
|
|
||
| @PostMapping | ||
| public ResponseEntity<Void> report(@RequestBody ReportRequest request) { |
There was a problem hiding this comment.
뭔가 void 말고 다른 응답 상태가 있으면 더 좋을 것 같아요!!
kdobi
reviewed
Apr 30, 2026
| @MappedSuperclass | ||
| @NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
| @AllArgsConstructor | ||
| @SuperBuilder |
There was a problem hiding this comment.
@builder는 단일 클래스에서 객체 생성을 편하게 해주는 용도로 알고 있었는데, 상속 구조에서는 @SuperBuilder를 사용할 수도 있었네요
HandoA01
approved these changes
Apr 30, 2026
Comment on lines
+29
to
+30
| request.targetId(), request.targetType(), request.reporterId())) { | ||
| throw new RuntimeException("이미 신고한 항목입니다."); |
There was a problem hiding this comment.
여기 부분 혹시 의도가 있으셨을까요? 저는 DuplicateReportException 같은 커스텀 예외 + GlobalExceptionHandler로 일관된 에러 응답을 보내는 식으로 처리해서, 클라이언트 입장에서 어떤 에러 형태로 오는지 궁금합니다!
Comment on lines
+50
to
+54
| if (!approve) { // 반려(REJECT) 시 활성 상태로 복구 | ||
| Reportable target = findTarget(report.getTargetId(), report.getTargetType()); | ||
| target.updateStatus(ContentStatus.ACTIVE); | ||
| } | ||
| } |
There was a problem hiding this comment.
신고 처리에서 반려 시 콘텐츠를 다시 ACTIVE로 되돌리는 로직 좋은것 같습니다! 이부분은 저도 참고하도록 하겠습니다!!
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. 과제 요구사항 중 구현한 내용
2. 핵심 변경 사항
3. 실행 및 검증 결과
요청
응답
응답
요청
응답
4. 완료 사항
5. 추가 사항
closed #148제출 체크리스트
{이름}/main브랜치다{이름}/{숫자}주차브랜치다Reviewer 참고