mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
POS: Updates from code review
This commit is contained in:
@@ -49,7 +49,7 @@ namespace BTCPayServer.Controllers
|
|||||||
if (app == null)
|
if (app == null)
|
||||||
return NotFound();
|
return NotFound();
|
||||||
var settings = app.GetSettings<PointOfSaleSettings>();
|
var settings = app.GetSettings<PointOfSaleSettings>();
|
||||||
PosViewType viewType = settings.DefaultView;
|
PosViewType viewType = settings.EnableShoppingCart? PosViewType.Cart : settings.DefaultView;
|
||||||
|
|
||||||
return RedirectToAction(nameof(ViewPointOfSale), new { appId, viewType });
|
return RedirectToAction(nameof(ViewPointOfSale), new { appId, viewType });
|
||||||
}
|
}
|
||||||
@@ -120,6 +120,7 @@ namespace BTCPayServer.Controllers
|
|||||||
if (app == null)
|
if (app == null)
|
||||||
return NotFound();
|
return NotFound();
|
||||||
var settings = app.GetSettings<PointOfSaleSettings>();
|
var settings = app.GetSettings<PointOfSaleSettings>();
|
||||||
|
settings.DefaultView = settings.EnableShoppingCart? PosViewType.Cart : settings.DefaultView;
|
||||||
if (string.IsNullOrEmpty(choiceKey) && !settings.ShowCustomAmount && settings.DefaultView != PosViewType.Cart)
|
if (string.IsNullOrEmpty(choiceKey) && !settings.ShowCustomAmount && settings.DefaultView != PosViewType.Cart)
|
||||||
{
|
{
|
||||||
return RedirectToAction(nameof(ViewPointOfSale), new { appId = appId, viewType = viewType });
|
return RedirectToAction(nameof(ViewPointOfSale), new { appId = appId, viewType = viewType });
|
||||||
|
|||||||
Reference in New Issue
Block a user