From a4aa6c5ab97676c948ef51c186958757396f091b Mon Sep 17 00:00:00 2001 From: d11n Date: Tue, 28 Jun 2022 07:10:45 +0200 Subject: [PATCH] Fix email rule remove action (#3901) It simply exited to early by returning the view. The updated rules didn't get saved afterwards. --- BTCPayServer/Controllers/UIStoresController.Email.cs | 6 +----- BTCPayServer/Views/UIStores/StoreEmails.cshtml | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/BTCPayServer/Controllers/UIStoresController.Email.cs b/BTCPayServer/Controllers/UIStoresController.Email.cs index f84c2a69a..c301c568d 100644 --- a/BTCPayServer/Controllers/UIStoresController.Email.cs +++ b/BTCPayServer/Controllers/UIStoresController.Email.cs @@ -48,11 +48,7 @@ namespace BTCPayServer.Controllers var item = command[(command.IndexOf(":", StringComparison.InvariantCultureIgnoreCase) + 1)..]; var index = int.Parse(item, CultureInfo.InvariantCulture); vm.Rules.RemoveAt(index); - - return View(vm); - } - - if (command == "add") + } else if (command == "add") { vm.Rules.Add(new StoreEmailRule()); diff --git a/BTCPayServer/Views/UIStores/StoreEmails.cshtml b/BTCPayServer/Views/UIStores/StoreEmails.cshtml index dcc23523a..d5337a3e2 100644 --- a/BTCPayServer/Views/UIStores/StoreEmails.cshtml +++ b/BTCPayServer/Views/UIStores/StoreEmails.cshtml @@ -5,7 +5,7 @@ Layout = "../Shared/_NavLayout.cshtml"; ViewData.SetActivePage(StoreNavPages.Emails, "Email Rules", Context.GetStoreData().Id); } -
+

@ViewData["Title"]