Skip to content

[FIX]댓글 좋아요 여부 표시 오류 수정#547

Merged
dlchdaud123 merged 2 commits intodevelopfrom
fix/commentIsLiked
Feb 27, 2026
Merged

[FIX]댓글 좋아요 여부 표시 오류 수정#547
dlchdaud123 merged 2 commits intodevelopfrom
fix/commentIsLiked

Conversation

@dlchdaud123
Copy link
Contributor

📝작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지 첨부 가능)

CommentResponse에 Boolean commentIsLiked 필드 추가 — 댓글 조회 시 현재 사용자의 좋아요 여부를 응답에 포함하도록 변경

CommentRepositoryImpl을 Projection 방식으로 전환 — FeedRepositoryImpl의 isLikedExpression
패턴과 동일하게 JPAExpressions.exists() 서브쿼리를 사용하여 DB 레벨에서 좋아요 여부를 판단

CommentQueryServiceImpl에서 현재 사용자 조회 후 Repository에 전달 — UserContextHolder로 로그인 사용자를 가져오고, 비로그인 시 false를 반환하도록 처리 + 관련 테스트 & RestDocs 업데이트

스크린샷 (선택)

API 응답 사진: (API 응답 스크린샷을 첨부해주세요.)
image

API 명세서 사진: (API 명세서 스크린샷을 첨부해주세요.)
image
image
image
image
image

테스트 커버리지 사진: (테스트 커버리지 스크린샷을 첨부해주세요.)
image

💬리뷰 요구사항(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

#️⃣연관된 이슈

ex) #이슈번호, Closes #이슈번호

@dlchdaud123 dlchdaud123 merged commit c53fd4e into develop Feb 27, 2026
@dlchdaud123 dlchdaud123 deleted the fix/commentIsLiked branch February 27, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant