in ddm-notification-service-inbox/src/main/java/com/epam/digital/data/platform/notification/inbox/service/InboxNotificationService.java [69:86]
public List<InboxNotificationResponseDto> getInboxNotifications(
String accessToken,
Pageable pageable) {
JwtClaims jwtClaims = tokenParserService.parseClaims(accessToken);
List<InboxNotification> byRecipientId = inboxNotificationRepository.findByRecipientId(
jwtClaims.getSubject(), pageable);
return byRecipientId.stream().map(inboxNotification ->
InboxNotificationResponseDto.builder()
.id(inboxNotification.getId())
.subject(inboxNotification.getSubject())
.message(inboxNotification.getMessage())
.isAcknowledged(inboxNotification.isAcknowledged())
.createdAt(inboxNotification.getCreatedAt())
.build()).collect(Collectors.toList());
}