Retain store ids when filtering invoices

This commit is contained in:
Umar Bolatov
2019-09-11 20:54:26 -07:00
parent 13c8372329
commit 0f7458254e
3 changed files with 22 additions and 10 deletions

View File

@@ -398,11 +398,15 @@ namespace BTCPayServer.Controllers
[BitpayAPIConstraint(false)]
public async Task<IActionResult> ListInvoices(string searchTerm = null, int skip = 0, int count = 50, int timezoneOffset = 0)
{
var fs = new SearchString(searchTerm);
var storeIds = fs.GetFilterArray("storeid") != null ? fs.GetFilterArray("storeid") : new List<string>().ToArray();
var model = new InvoicesModel
{
SearchTerm = searchTerm,
Skip = skip,
Count = count,
StoreIds = storeIds,
TimezoneOffset = timezoneOffset
};
InvoiceQuery invoiceQuery = GetInvoiceQuery(searchTerm, timezoneOffset);