feat: uninstall plugin

pull/9184/head
Yeuoly 2 years ago
parent eef79a5196
commit 3c1d32e3ac
No known key found for this signature in database
GPG Key ID: A66E7E320FB19F61

@ -31,10 +31,10 @@ class PluginInstallationManager(BasePluginManager):
""" """
identifier = quote(identifier) identifier = quote(identifier)
# exception will be raised if the request failed # exception will be raised if the request failed
self._request_with_plugin_daemon_response( return self._request_with_plugin_daemon_response(
"POST", "POST",
f"/plugin/{tenant_id}/install/identifier", f"/plugin/{tenant_id}/install/identifier",
dict, bool,
headers={ headers={
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
@ -43,4 +43,10 @@ class PluginInstallationManager(BasePluginManager):
}, },
) )
return True def uninstall(self, tenant_id: str, identifier: str) -> bool:
"""
Uninstall a plugin.
"""
return self._request_with_plugin_daemon_response(
"DELETE", f"/plugin/{tenant_id}/uninstall?plugin_unique_identifier={identifier}", bool
)

Loading…
Cancel
Save