Skip to content

Commit

Permalink
fix: 홈-알림 내역 필터링 추가 (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaBaljaintheroom committed Jan 4, 2025
1 parent 6bd641f commit b1c57c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ public NotificationServiceResponse findNotifications(UUID userId, UUID cursorId,

var response = alarmClientManager.getNotificationPagination(userFcmToken, cursorId, cursorValue, size);
if (response != null) {
List<UUID> showIds = response.data().stream()
List<UUID> showIdsByAlarm = response.data().stream()
.map(NotificationInfoResponse::showId)
.toList();
List<Show> shows = showRepository.findShowsByIdInAndIsDeletedFalse(showIds);
List<Show> shows = showRepository.findShowsByIdInAndIsDeletedFalse(showIdsByAlarm);

return NotificationServiceResponse.of(response, shows);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public static NotificationServiceResponse of(
.collect(Collectors.toMap(Show::getId, Show::getImage));

List<NotificationInfoWithImageResponse> updatedData = response.data().stream()
.filter(info -> showIdToImageUrlMap.containsKey(info.showId()))
.map(info -> NotificationInfoWithImageResponse.builder()
.id(info.id())
.showId(info.showId())
Expand Down

0 comments on commit b1c57c9

Please sign in to comment.