Skip to content

Commit

Permalink
Fix empty notification ID issue (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bardin08 authored Jun 2, 2024
1 parent 21c9489 commit 6388789
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Core/Services/NotificationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public async Task<ErrorOr<NotificationDto>> CreateNotification(

ct.ThrowIfCancellationRequested();
await notificationsRepository.InsertOne(notification);
dto = dto with { Id = notification.Id.ToString() };

var deliveryRequests = CreateDeliveryRequests(dto).ToList();

Expand All @@ -31,8 +32,7 @@ public async Task<ErrorOr<NotificationDto>> CreateNotification(
await notificationsAnalyticsClient
.SendNotificationCreated(deliveryRequest.NotificationId, ct);
}

dto = dto with { Id = notification.Id.ToString() };

return dto;
}

Expand Down

0 comments on commit 6388789

Please sign in to comment.