mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +01:00
Allowing for POS to be displayed at website root (#853)
* Allowing for POS to be displayed at website root * Switching to asp attributes for form post action * Applying default formatting rules on HTML
This commit is contained in:
committed by
Nicolas Dorier
parent
5a73358bca
commit
de1c2b0150
@@ -24,7 +24,7 @@ namespace BTCPayServer.Controllers
|
||||
HttpClientFactory = httpClientFactory;
|
||||
_cachedServerSettings = cachedServerSettings;
|
||||
}
|
||||
|
||||
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
if (_cachedServerSettings.RootAppType is Services.Apps.AppType.Crowdfund)
|
||||
@@ -40,6 +40,20 @@ namespace BTCPayServer.Controllers
|
||||
return res; // return
|
||||
}
|
||||
}
|
||||
else if (_cachedServerSettings.RootAppType is Services.Apps.AppType.PointOfSale)
|
||||
{
|
||||
var serviceProvider = HttpContext.RequestServices;
|
||||
var controller = (AppsPublicController)serviceProvider.GetService(typeof(AppsPublicController));
|
||||
controller.Url = Url;
|
||||
controller.ControllerContext = ControllerContext;
|
||||
var res = await controller.ViewPointOfSale(_cachedServerSettings.RootAppId) as ViewResult;
|
||||
if (res != null)
|
||||
{
|
||||
res.ViewName = "/Views/AppsPublic/ViewPointOfSale.cshtml";
|
||||
return res; // return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return View("Home");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user