make individual action items

This commit is contained in:
Kukks
2020-07-27 10:43:35 +02:00
committed by nicolas.dorier
parent 5f6f54db36
commit 8dea7df82a
9 changed files with 296 additions and 87 deletions

View File

@@ -32,10 +32,10 @@ namespace BTCPayServer.Controllers.GreenField
[Authorize(Policy = Policies.CanViewPaymentRequests, AuthenticationSchemes = AuthenticationSchemes.Greenfield)]
[HttpGet("~/api/v1/stores/{storeId}/payment-requests")]
public async Task<ActionResult<IEnumerable<PaymentRequestData>>> GetPaymentRequests(string storeId)
public async Task<ActionResult<IEnumerable<PaymentRequestData>>> GetPaymentRequests(string storeId, bool includeArchived = false)
{
var prs = await _paymentRequestRepository.FindPaymentRequests(
new PaymentRequestQuery() { StoreId = storeId, IncludeArchived = false });
new PaymentRequestQuery() { StoreId = storeId, IncludeArchived = includeArchived });
return Ok(prs.Items.Select(FromModel));
}