mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 14:04:26 +01:00
Merge pull request #1742 from bolatovumar/feat/1709
Allow mass-archiving of invoices
This commit is contained in:
@@ -291,6 +291,24 @@ namespace BTCPayServer.Controllers
|
||||
return RedirectToAction(nameof(invoice), new { invoiceId });
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> MassAction(string command, string[] selectedItems)
|
||||
{
|
||||
if (selectedItems != null)
|
||||
{
|
||||
switch (command)
|
||||
{
|
||||
case "archive":
|
||||
await _InvoiceRepository.MassArchive(selectedItems);
|
||||
TempData[WellKnownTempData.SuccessMessage] = $"{selectedItems.Length} invoice(s) archived.";
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(ListInvoices));
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("i/{invoiceId}")]
|
||||
[Route("i/{invoiceId}/{paymentMethodId}")]
|
||||
|
||||
Reference in New Issue
Block a user