Greenfield: Add store id for notifications (#6093)

* Rename filter to storeid for consistency with other filters

* Greenfield: Add storeId to notification

* Cleanups

* Greenfield: Allow filtering notifications by store id
This commit is contained in:
d11n
2024-07-10 17:12:22 +02:00
committed by GitHub
parent d73e26e0c4
commit a4a1fa0746
10 changed files with 100 additions and 59 deletions

View File

@@ -151,9 +151,9 @@ namespace BTCPayServer.Services.Notifications
}
}
}
if (query.Stores?.Length > 0)
if (query.StoreIds?.Length > 0)
{
notifications = notifications.Where(n => !string.IsNullOrEmpty(n.StoreId) && query.Stores.Contains(n.StoreId, StringComparer.OrdinalIgnoreCase)).ToList();
notifications = notifications.Where(n => !string.IsNullOrEmpty(n.StoreId) && query.StoreIds.Contains(n.StoreId, StringComparer.OrdinalIgnoreCase)).ToList();
}
return notifications;
}
@@ -221,6 +221,6 @@ namespace BTCPayServer.Services.Notifications
public bool? Seen { get; set; }
public string SearchText { get; set; }
public string[] Type { get; set; }
public string[] Stores { get; set; }
public string[] StoreIds { get; set; }
}
}