Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#74 Feat: add post delete function #107

Merged
merged 3 commits into from
Dec 26, 2024
Merged

#74 Feat: add post delete function #107

merged 3 commits into from
Dec 26, 2024

Conversation

kjiyun
Copy link
Collaborator

@kjiyun kjiyun commented Dec 23, 2024

#️⃣연관된 이슈

ex) #74

📝작업 내용

게시글 삭제 기능 추가

@kjiyun kjiyun added the ✨ Feature 기능 개발 label Dec 23, 2024
@kjiyun kjiyun requested review from yumzen and woogieon8on December 23, 2024 02:44
@kjiyun kjiyun self-assigned this Dec 23, 2024
@woogieon8on
Copy link
Collaborator

코드가 세밀하게 잘 짜여진 것 같군요

Copy link
Member

@yumzen yumzen left a comment

Choose a reason for hiding this comment

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

코드가 세밀하게 잘 짜여진 것 같군요

return PostConverter.toPostGetResponse(existingPost);
boolean isLiked = postLikesRepository.findByPostAndUser(existingPost, user).isPresent();

Post updatedPost = Post.withLikeStatus(existingPost, isLiked);
Copy link
Member

Choose a reason for hiding this comment

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

isLiked를 Post에서 관리하도록 한 이유가 있나여? 조회할 때마다 update가 일어나니까 isLiked값을 바로 컨버터로 전달해서 반환해주는 것도 좋을 것 같아요!

@kjiyun kjiyun merged commit 77e2b0d into kahluaband:main Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature 기능 개발
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants