[4주차] 임현성/[feat] 추가 API 구현#165
Open
HyeonSeongIM wants to merge 2 commits intoLeets-Official:임현성/mainfrom
Hidden character warning
The head ref may contain hidden characters: "\uc784\ud604\uc131/4\uc8fc\ucc28"
Open
Conversation
HandoA01
approved these changes
Apr 30, 2026
There was a problem hiding this comment.
기존에 record 안에서 PostException을 던지던 걸 @NotBlank/@SiZe로 빼고, 주석으로 이유까지 남겨두신 부분 좋네요! DTO에서는 형식 검증만, 비즈니스 검증은 서비스로 옮기는 흐름이 깔끔한 것 같습니다!!
|
4주차 개발도 수고 많으셨습니다 ! :) |
kdobi
reviewed
Apr 30, 2026
|
|
||
| public Comment update(Long commentId, String newContent) { | ||
| Comment comment = commentRepository.findById(commentId) | ||
| .orElseThrow(() -> new CommentException(CommentErrorCode.COMMENT_NOT_FOUND)); |
There was a problem hiding this comment.
orElseThrow에서 람다식을 활용한 부분이 깔끔하게 잘 작성된 것 같습니다.
kallin1
approved these changes
Apr 30, 2026
|
|
||
| // [ADD] CommentManager.delete()에서 호출 — 물리 삭제 대신 상태 전이 | ||
| public void softDelete() { | ||
| this.status = ContentStatus.HIDDEN; |
There was a problem hiding this comment.
softdelete시에 hidden으로 상태를 변환하고, 신고가 누적될 경우에도 hidden으로 상태변환하시는 것 같은데 두 경우 모두 hidden으로 처리되면 나중에 삭제된건지 신고로 숨겨진건지 구분이 어려울 것 같아요! 혹시 따로 구분가능하게 처리하신 부분이 있나요?
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. 과제 요구사항 중 구현한 내용
GET /health)POST /string/repeat)2. 핵심 변경 사항
Report 도메인 추가
Like 도메인 추가
단순 CRUD를 넘어 상태 변경 및 중복 방지 로직 포함한 비즈니스 로직 설계
3. 실행 및 검증 결과
실행 결과:
GET /health 응답:
{
"status": "OK"
}
POST /string/repeat 요청:
{
"string1": "hello",
"string2": "world"
}
POST /string/repeat 응답:
{
"result": "helloworld"
}
주요 기능 검증:
게시물 신고
POST /api/posts/{postId}/reports
→ 신고 생성 및 상태 PENDING 확인
댓글 신고
POST /api/comments/{commentId}/reports
→ 댓글 대상 신고 정상 생성
신고 처리 완료
PATCH /api/reports/{reportId}/resolve
→ PENDING → RESOLVED 상태 변경 확인
게시글 좋아요
POST /api/posts/{postId}/likes
→ 최초 요청 시 정상 생성
→ 동일 유저 재요청 시 중복 방지 확인
4. 완료 사항
5. 추가 사항
관련 이슈: closed #이슈번호
리뷰 포인트:
제출 체크리스트
PR 제목이 규칙에 맞다
base가
{이름}/main브랜치다compare가
{이름}/{숫자}주차브랜치다프로젝트가 정상 실행된다
본인을 Assignee로 지정했다
리뷰 피드백을 반영한 뒤 머지/PR close를 진행한다