UI: Fix cancel plugin command (#3903)

* UI: Fix cancel plugin command

As installing a plugin also adds the delete/uninstall command, we just select the last action, which is the one the user triggered. 

Fixes #3890.

* Apply suggestions from code review

https://stackoverflow.com/questions/50100688/check-if-value-tuple-is-default
This commit is contained in:
d11n
2022-06-28 10:38:47 +02:00
committed by GitHub
parent a4aa6c5ab9
commit d43bdcc1a2
2 changed files with 6 additions and 13 deletions

View File

@@ -66,6 +66,7 @@ namespace BTCPayServer.Controllers
return RedirectToAction("ListPlugins");
}
[HttpPost("server/plugins/cancel")]
public IActionResult CancelPluginCommands(
[FromServices] PluginService pluginService, string plugin)
@@ -93,7 +94,6 @@ namespace BTCPayServer.Controllers
}
else
{
pluginService.InstallPlugin(plugin);
}
TempData.SetStatusMessageModel(new StatusMessageModel()