Skip to content

Commit

Permalink
Merge pull request #614 from tukcomCD2024/fix/group_capsules-B-#613
Browse files Browse the repository at this point in the history
fix : 그룹이 없는 경우 예외 처리 #613
  • Loading branch information
GaBaljaintheroom authored Aug 6, 2024
2 parents f3f2b9f + 1386cc9 commit c2fa16e
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -199,6 +202,10 @@ public Slice<GroupCapsuleDto> findGroupCapsuleSlice(
) {
final List<Long> groupIds = memberGroupRepository.findGroupIdsByMemberId(memberId);

if (groupIds.isEmpty()) {
return new SliceImpl<>(Collections.emptyList());
}

return groupCapsuleQueryRepository.findGroupCapsuleSlice(size, lastCapsuleId,
groupIds);
}
Expand Down

0 comments on commit c2fa16e

Please sign in to comment.