diff --git a/BTCPayServer/Plugins/PointOfSale/Controllers/UIPointOfSaleController.cs b/BTCPayServer/Plugins/PointOfSale/Controllers/UIPointOfSaleController.cs index 07af727b9..98c239342 100644 --- a/BTCPayServer/Plugins/PointOfSale/Controllers/UIPointOfSaleController.cs +++ b/BTCPayServer/Plugins/PointOfSale/Controllers/UIPointOfSaleController.cs @@ -523,7 +523,7 @@ namespace BTCPayServer.Plugins.PointOfSale.Controllers return View("Views/UIForms/View", viewModel); } - [Authorize(Policy = Policies.CanModifyStoreSettings, AuthenticationSchemes = AuthenticationSchemes.Cookie)] + [Authorize(Policy = Policies.CanViewInvoices, AuthenticationSchemes = AuthenticationSchemes.Cookie)] [HttpGet("/apps/{appId}/pos/recent-transactions")] public async Task RecentTransactions(string appId) { diff --git a/BTCPayServer/Views/Shared/PointOfSale/Public/VueLight.cshtml b/BTCPayServer/Views/Shared/PointOfSale/Public/VueLight.cshtml index c87eb7f08..fa4d31187 100644 --- a/BTCPayServer/Views/Shared/PointOfSale/Public/VueLight.cshtml +++ b/BTCPayServer/Views/Shared/PointOfSale/Public/VueLight.cshtml @@ -1,3 +1,4 @@ +@using BTCPayServer.Client @model BTCPayServer.Plugins.PointOfSale.Models.ViewPointOfSaleViewModel
@@ -89,7 +90,7 @@ -
diff --git a/BTCPayServer/wwwroot/pos/keypad.js b/BTCPayServer/wwwroot/pos/keypad.js index 43e98f987..d44ca797a 100644 --- a/BTCPayServer/wwwroot/pos/keypad.js +++ b/BTCPayServer/wwwroot/pos/keypad.js @@ -131,11 +131,16 @@ document.addEventListener("DOMContentLoaded",function () { async loadRecentTransactions() { this.recentTransactionsLoading = true; const { url } = this.$refs.RecentTransactions.dataset; - const response = await fetch(url); - if (response.ok) { - this.recentTransactions = await response.json(); + try { + const response = await fetch(url); + if (response.ok) { + this.recentTransactions = await response.json(); + } + } catch (error) { + console.error(error); + } finally { + this.recentTransactionsLoading = false; } - this.recentTransactionsLoading = false; } }, created() {