mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-20 13:34:37 +01:00
Fix email rule remove action (#3901)
It simply exited to early by returning the view. The updated rules didn't get saved afterwards.
This commit is contained in:
parent
6d3e1bb40a
commit
a4aa6c5ab9
2 changed files with 2 additions and 6 deletions
|
@ -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());
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
Layout = "../Shared/_NavLayout.cshtml";
|
||||
ViewData.SetActivePage(StoreNavPages.Emails, "Email Rules", Context.GetStoreData().Id);
|
||||
}
|
||||
<form class="row" asp-action="StoreEmails" asp-route-storeId="@Context.GetStoreData().Id">
|
||||
<form class="row" asp-action="StoreEmails" method="post" asp-route-storeId="@Context.GetStoreData().Id">
|
||||
<div class="col-xxl-constrain">
|
||||
<div class="d-flex align-items-center justify-content-between mt-n1 mb-3">
|
||||
<h3 class="mb-0">@ViewData["Title"]</h3>
|
||||
|
|
Loading…
Add table
Reference in a new issue