From 2947093d19ce945fe3a59d941a9c88d90c195b5e Mon Sep 17 00:00:00 2001 From: hong seokho Date: Mon, 5 Aug 2024 20:36:52 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EA=B7=B8=EB=A3=B9=EC=9D=B4=20?= =?UTF-8?q?=EC=97=86=EB=8A=94=20=EA=B2=BD=EC=9A=B0=20=EC=98=88=EC=99=B8=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../capsule/group_capsule/service/GroupCapsuleService.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/service/GroupCapsuleService.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/service/GroupCapsuleService.java index 7476b98d6..6b6e88594 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/service/GroupCapsuleService.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/service/GroupCapsuleService.java @@ -2,10 +2,13 @@ import java.time.ZoneOffset; import java.time.ZonedDateTime; +import java.util.Collections; import java.util.List; import lombok.RequiredArgsConstructor; import org.locationtech.jts.geom.Point; import org.springframework.data.domain.Slice; +import org.springframework.data.domain.SliceImpl; +import org.springframework.security.core.parameters.P; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import site.timecapsulearchive.core.domain.capsule.data.dto.CapsuleBasicInfoDto; @@ -199,6 +202,10 @@ public Slice findGroupCapsuleSlice( ) { final List groupIds = memberGroupRepository.findGroupIdsByMemberId(memberId); + if (groupIds.isEmpty()) { + return new SliceImpl<>(Collections.emptyList()); + } + return groupCapsuleQueryRepository.findGroupCapsuleSlice(size, lastCapsuleId, groupIds); }