Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

#67 글 삭제시 댓글, 리액션 삭제 #74

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

y2o2u2n
Copy link
Collaborator

@y2o2u2n y2o2u2n commented Mar 6, 2022

No description provided.

@y2o2u2n y2o2u2n self-assigned this Mar 6, 2022
Comment on lines +63 to +66
reactionRepository.findAllByTargetIn(it.stream()
.map { a -> ReactionTarget(ReactionTargetType.COMMENT, a.id!!) }
.toList())
.let { reactions -> reactionRepository.deleteAll(reactions) }
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
reactionRepository.findAllByTargetIn(it.stream()
.map { a -> ReactionTarget(ReactionTargetType.COMMENT, a.id!!) }
.toList())
.let { reactions -> reactionRepository.deleteAll(reactions) }
reactionRepository.findAllByTargetIn(it.map { r -> ReactionTarget(ReactionTargetType.COMMENT, r.id!!) }
.let { reactions -> reactionRepository.deleteAll(reactions) }

kotlin 에서는 stream 으로 변환하지 않아도 사용할 수 있어요

/**
* Created by JunSeok Youn on 2022/03/06
*/
@Repository
Copy link
Contributor

Choose a reason for hiding this comment

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

이거는 NoRepositoryBean 으로 변경되어야할 것 같아요

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants