mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
UI: Store setup finetuning (#2087)
* UI: Store setup finetuning Incorporate @dstrukt's improvement feedback from [this comment](https://github.com/btcpayserver/btcpayserver/pull/2011#issuecomment-735909927). * Clean up and fix test
This commit is contained in:
@@ -996,29 +996,5 @@ namespace BTCPayServer.Controllers
|
||||
storeId = CurrentStore.Id
|
||||
});
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("{storeId}/dismissHint")]
|
||||
[IgnoreAntiforgeryToken]
|
||||
public async Task<IActionResult> DismissHint(string id)
|
||||
{
|
||||
var blob = CurrentStore.GetStoreBlob();
|
||||
if (id == "Wallet" || id == "Lightning")
|
||||
{
|
||||
try
|
||||
{
|
||||
var prop = blob.Hints.GetType().GetProperty(id);
|
||||
prop.SetValue(blob.Hints, false);
|
||||
}
|
||||
// disregard parse errors
|
||||
catch { }
|
||||
|
||||
if (CurrentStore.SetStoreBlob(blob))
|
||||
{
|
||||
await _Repo.UpdateStore(CurrentStore);
|
||||
}
|
||||
}
|
||||
return Content("ack");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user