mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 05:54:26 +01:00
Issue 6918 re enable plugin (#6930)
* Added the enable button on disabled plugins * Added the disable function and button for installed plugins * Changes based on the coderabbitai comments * Removed markers and added the disable in the same if block as the unistall * Hide the uninstall button when plugin is queued for enabling * Removed the duplicate enale function * Removed the disable button for installed plugins * Removed the disableplugin functions as they are no longer needed * Trigger CI pipeline after dotnet restore * reverted the git ignore
This commit is contained in:
@@ -86,6 +86,20 @@ namespace BTCPayServer.Controllers
|
||||
return RedirectToAction("ListPlugins");
|
||||
}
|
||||
|
||||
[HttpPost("server/plugins/enable")]
|
||||
public IActionResult EnablePlugin(
|
||||
[FromServices] PluginService pluginService, string plugin)
|
||||
{
|
||||
pluginService.EnablePlugin(plugin);
|
||||
TempData.SetStatusMessageModel(new StatusMessageModel
|
||||
{
|
||||
Message = StringLocalizer["Plugin scheduled to be enabled."].Value,
|
||||
Severity = StatusMessageModel.StatusSeverity.Success
|
||||
});
|
||||
|
||||
return RedirectToAction("ListPlugins");
|
||||
}
|
||||
|
||||
[HttpPost("server/plugins/cancel")]
|
||||
public IActionResult CancelPluginCommands(
|
||||
[FromServices] PluginService pluginService, string plugin)
|
||||
|
||||
Reference in New Issue
Block a user