This commit is contained in:
Mike Casas 2020-06-18 07:35:40 -04:00
parent ab8a1e7324
commit ee5553ad8a
3 changed files with 5 additions and 2 deletions

View File

@ -66,6 +66,7 @@
notification.CreatedOn = DateTime.UtcNow;
notification.IsDelivered = false;
notification.DeliveredOn = null;
notification.SendOn = DateTime.UtcNow;
notification = await NotificationService.AddNotificationAsync(notification);
await logger.LogInformation("Notification Created {Notification}", notification);
NavigationManager.NavigateTo(NavigateUrl());

View File

@ -192,6 +192,7 @@
notification.CreatedOn = DateTime.UtcNow;
notification.IsDelivered = false;
notification.DeliveredOn = null;
notification.SendOn = DateTime.UtcNow;
notification = await NotificationService.AddNotificationAsync(notification);
await logger.LogInformation("Notification Created {Notification}", notification);
NavigationManager.NavigateTo(NavigateUrl());

View File

@ -21,6 +21,7 @@ namespace Oqtane.Repository
return _db.Notification
.Where(item => item.SiteId == siteId)
.Where(item => item.IsDelivered == false)
.Where(item => item.SendOn < System.DateTime.UtcNow)
.ToList();
}