Stable run on Notification creation
This commit is contained in:
@@ -31,7 +31,7 @@ public class NotificationService(IDbContextFactory<ShopDbContext> contextFactory
|
||||
Processed = false
|
||||
});
|
||||
|
||||
return newNotification is not null
|
||||
return await context.SaveChangesAsync(cancellationToken) > 0
|
||||
? Result.Ok(newNotification.Entity.Id)
|
||||
: Result.Fail(new Error("Failed to create notification"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user