fix: include recipients in artifact deployment and load shared scripts on startup
NotificationRepository.GetAllNotificationListsAsync() was missing .Include(Recipients), causing artifact deployments to push empty recipient lists to sites. Also load shared scripts from SQLite on DeploymentManager startup so they're available before Instance Actors compile their scripts.
This commit is contained in:
@@ -17,7 +17,7 @@ public class NotificationRepository : INotificationRepository
|
||||
=> await _context.Set<NotificationList>().FindAsync(new object[] { id }, cancellationToken);
|
||||
|
||||
public async Task<IReadOnlyList<NotificationList>> GetAllNotificationListsAsync(CancellationToken cancellationToken = default)
|
||||
=> await _context.Set<NotificationList>().ToListAsync(cancellationToken);
|
||||
=> await _context.Set<NotificationList>().Include(n => n.Recipients).ToListAsync(cancellationToken);
|
||||
|
||||
public async Task<NotificationList?> GetListByNameAsync(string name, CancellationToken cancellationToken = default)
|
||||
=> await _context.Set<NotificationList>().FirstOrDefaultAsync(l => l.Name == name, cancellationToken);
|
||||
|
||||
Reference in New Issue
Block a user