Skip to content

[FIX] 공감 API - 중복 가능하게 변경#81

Merged
rhkr8521 merged 1 commit intodevelopfrom
fix/#79
Feb 14, 2026
Merged

[FIX] 공감 API - 중복 가능하게 변경#81
rhkr8521 merged 1 commit intodevelopfrom
fix/#79

Conversation

@gogori6565
Copy link
Contributor

@gogori6565 gogori6565 commented Feb 14, 2026

📣 Related Issue

📝 Summary

게시글에 대한 공감 버튼을 중복 선택 가능하게 변경하였습니다.

  • 게시글 response의 "myLikesStatus" 필드를 통해 해당 게시글에 내가 누른 공감 유형 정보를 true(누름)/false(안 누름)로 확인할 수 있습니다
  • 필드 네이밍 명확성을 위해 기존 게시글의 공감 개수 표시를 위한 필드: "LikeInfo" -> "LikeCnt"로 변경하였습니다.

[추후 리팩토링 예정]

  • 공감 중복 기능으로 변경 후, 게시글 전체 조회 API에서 게시글 당 공감 조회가 많아지는 'N+1 문제'가 발생합니다. 이는 이전 PR 승인 후(코드 충돌 가능성 有) 리팩토링 진행하겠습니다.
    • 게시글 목록을 조회할 때도 "내가 누른 공감" 표시를 위해, 수십 개의 게시글에 대해 일일이 DB를 조회하는 문제 = N+1 문제

📬 Reference

[myLikesStatus 필드]
image

Copy link
Member

@rhkr8521 rhkr8521 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다.

@rhkr8521 rhkr8521 merged commit 40c2eed into develop Feb 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] 공감 API - 중복 가능하게 변경

2 participants