Skip to content

Commit

Permalink
Fix issue with empty notification ID
Browse files Browse the repository at this point in the history
  • Loading branch information
Bardin08 committed Jun 2, 2024
1 parent 0d120bb commit 7873dd1
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 7873dd1

Please sign in to comment.