Skip to content

Commit 7873dd1

Browse files
committed
Fix issue with empty notification ID
1 parent 0d120bb commit 7873dd1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Core/Services/NotificationService.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public async Task<ErrorOr<NotificationDto>> CreateNotification(
2222

2323
ct.ThrowIfCancellationRequested();
2424
await notificationsRepository.InsertOne(notification);
25+
dto = dto with { Id = notification.Id.ToString() };
2526

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

@@ -31,8 +32,7 @@ public async Task<ErrorOr<NotificationDto>> CreateNotification(
3132
await notificationsAnalyticsClient
3233
.SendNotificationCreated(deliveryRequest.NotificationId, ct);
3334
}
34-
35-
dto = dto with { Id = notification.Id.ToString() };
35+
3636
return dto;
3737
}
3838

0 commit comments

Comments
 (0)