From 3a7e610cc3104d5a8b95ff4e08c43d2e319024cd Mon Sep 17 00:00:00 2001 From: Ohjintaek Date: Wed, 27 Mar 2024 23:41:13 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=ED=98=B8=EC=B6=9C=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/RoadmapReviewDeleteEventListener.java | 9 +-------- backend/kirikiri/src/main/resources/properties | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/backend/kirikiri/src/main/java/co/kirikiri/roadmap/service/RoadmapReviewDeleteEventListener.java b/backend/kirikiri/src/main/java/co/kirikiri/roadmap/service/RoadmapReviewDeleteEventListener.java index 046fdd173..803f51a28 100644 --- a/backend/kirikiri/src/main/java/co/kirikiri/roadmap/service/RoadmapReviewDeleteEventListener.java +++ b/backend/kirikiri/src/main/java/co/kirikiri/roadmap/service/RoadmapReviewDeleteEventListener.java @@ -3,7 +3,6 @@ import co.kirikiri.roadmap.persistence.RoadmapReviewRepository; import co.kirikiri.roadmap.service.event.RoadmapDeleteEvent; import lombok.RequiredArgsConstructor; -import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.event.EventListener; import org.springframework.stereotype.Service; @@ -12,15 +11,9 @@ public class RoadmapReviewDeleteEventListener { private final RoadmapReviewRepository roadmapReviewRepository; - private final ApplicationEventPublisher applicationEventPublisher; @EventListener(condition = "#roadmapDeleteEvent.target == 'Review'") public void handleRoadmapReviewDelete(final RoadmapDeleteEvent roadmapDeleteEvent) { - deleteRoadmapReviews(roadmapDeleteEvent.roadmapId()); - } - - private void deleteRoadmapReviews(final Long roadmapId) { - roadmapReviewRepository.deleteAllByRoadmapId(roadmapId); - applicationEventPublisher.publishEvent(new RoadmapDeleteEvent(roadmapId, "Roadmap")); + roadmapReviewRepository.deleteAllByRoadmapId(roadmapDeleteEvent.roadmapId()); } } diff --git a/backend/kirikiri/src/main/resources/properties b/backend/kirikiri/src/main/resources/properties index 2a724a7f4..c5f41e5e1 160000 --- a/backend/kirikiri/src/main/resources/properties +++ b/backend/kirikiri/src/main/resources/properties @@ -1 +1 @@ -Subproject commit 2a724a7f4b45163a35cf72ab579444baa063316f +Subproject commit c5f41e5e110dcb998446e18a52b31f6f4cc33d6f