mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-04-30 12:40:33 +00:00
fix plugins deletion logic
This commit is contained in:
parent
8c90ad54ae
commit
bb186c55c4
3 changed files with 16 additions and 12 deletions
|
|
@ -152,7 +152,7 @@ const model = {
|
|||
},
|
||||
|
||||
async deletePlugin(plugin) {
|
||||
if (!plugin?.path) return;
|
||||
if (!plugin?.name) return;
|
||||
|
||||
if (!plugin.is_custom) {
|
||||
showErrorNotification(
|
||||
|
|
@ -166,7 +166,6 @@ const model = {
|
|||
const response = await api.callJsonApi("plugins", {
|
||||
action: "delete_plugin",
|
||||
plugin_name: plugin.name,
|
||||
path: plugin.path,
|
||||
});
|
||||
if (response?.error) {
|
||||
throw new Error(response.error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue