Simplified notification updating
continuous-integration/drone/pr Build is passing

This commit is contained in:
Khwezi Mngoma
2026-05-17 16:00:35 +02:00
parent 97bde73777
commit da141311ff
2 changed files with 3 additions and 7 deletions
@@ -40,7 +40,7 @@ public class NotificationsFeatureTests(CommonFixture fixture, ITestOutputHelper
{
DateRange range = new()
{
From = DateOnly.FromDateTime(new DateTime(2026, 05, 01, 0, 0, 0, DateTimeKind.Utc)),
From = DateOnly.FromDateTime(new DateTime(2026, 04, 01, 0, 0, 0, DateTimeKind.Utc)),
To = DateOnly.FromDateTime(DateTime.UtcNow),
MaxRecords = 10
};
@@ -97,12 +97,8 @@ public class NotificationService(IDbContextFactory<ShopDbContext> contextFactory
notification.Processed = request.Processed;
notification.UpdatedAt = DateTime.UtcNow;
if (request.HasError)
{
notification.HasError = request.HasError;
notification.Errors = request.Errors;
}
notification.HasError = request.HasError;
notification.Errors = request.Errors;
return await context.SaveChangesAsync(cancellationToken) > 0
? Result.Ok()