Skip to content

Commit

Permalink
Merge pull request #302 from depromeet/refactor/#301-noti-list
Browse files Browse the repository at this point in the history
fix: 알림 리스트 필터 제거
  • Loading branch information
char-yb authored Oct 11, 2024
2 parents ea0df35 + d8c0cb4 commit bb8f746
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.depromeet.stonebed.infra.properties.DiscordProperties;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpHeaders;
Expand Down Expand Up @@ -42,7 +43,7 @@ public void sendDiscordMessage(String message) {
ErrorCode.DISCORD_NOTIFICATION_FAILED);
}
log.info("Discord 알림 전송 성공: {}", message);
return response.bodyTo(String.class);
return Objects.requireNonNull(response.bodyTo(String.class));
});

} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,7 @@ private Pageable createPageable(int limit) {
}

private List<FcmNotificationDto> convertToNotificationDto(List<FcmNotification> notifications) {
List<Long> targetIds =
notifications.stream()
.filter(
notification ->
notification.getType() == FcmNotificationType.BOOSTER)
.map(FcmNotification::getTargetId)
.toList();
List<Long> targetIds = notifications.stream().map(FcmNotification::getTargetId).toList();

Map<Long, MissionRecord> missionRecordMap =
missionRecordRepository.findByIdIn(targetIds).stream()
Expand Down

0 comments on commit bb8f746

Please sign in to comment.