Add more labels (payment requests, apps, better payout label)

This commit is contained in:
Kukks
2020-09-17 16:39:55 +02:00
parent 7e60328cff
commit 8a3c751c10
5 changed files with 99 additions and 2 deletions

View File

@@ -38,6 +38,21 @@ namespace BTCPayServer.Controllers
private readonly InvoiceController _InvoiceController;
private readonly UserManager<ApplicationUser> _UserManager;
[HttpGet("/apps/{appId}")]
public async Task<IActionResult> RedirectToApp(string appId)
{
switch (await _AppService.GetAppInfo(appId))
{
case ViewCrowdfundViewModel _:
return RedirectToAction("ViewCrowdfund", new {appId});
case ViewPointOfSaleViewModel _:
return RedirectToAction("ViewPointOfSale", new {appId});
}
return NotFound();
}
[HttpGet]
[Route("/apps/{appId}/pos/{viewType?}")]
[XFrameOptionsAttribute(XFrameOptionsAttribute.XFrameOptions.AllowAll)]