mirror of
https://github.com/langgenius/dify.git
synced 2026-04-28 22:48:07 +08:00
feat: support upgrade interfaces
This commit is contained in:
@ -141,3 +141,27 @@ class PluginInstallationManager(BasePluginManager):
|
||||
},
|
||||
headers={"Content-Type": "application/json"},
|
||||
)
|
||||
|
||||
def upgrade_plugin(
|
||||
self,
|
||||
tenant_id: str,
|
||||
original_plugin_unique_identifier: str,
|
||||
new_plugin_unique_identifier: str,
|
||||
source: PluginInstallationSource,
|
||||
meta: dict,
|
||||
) -> PluginInstallTaskStartResponse:
|
||||
"""
|
||||
Upgrade a plugin.
|
||||
"""
|
||||
return self._request_with_plugin_daemon_response(
|
||||
"POST",
|
||||
f"plugin/{tenant_id}/management/upgrade",
|
||||
PluginInstallTaskStartResponse,
|
||||
data={
|
||||
"original_plugin_unique_identifier": original_plugin_unique_identifier,
|
||||
"new_plugin_unique_identifier": new_plugin_unique_identifier,
|
||||
"source": source,
|
||||
"meta": meta,
|
||||
},
|
||||
headers={"Content-Type": "application/json"},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user