Merge pull request #2927 from dataease/pr@dev@feat_plugin_update_api

feat(系统管理-插件管理): 插件更新api
This commit is contained in:
fit2cloud-chenyw 2022-08-24 14:07:53 +08:00 committed by GitHub
commit c8fd46041c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,4 +49,14 @@ public class SysPluginController {
return pluginService.uninstall(pluginId); return pluginService.uninstall(pluginId);
} }
@ApiOperation("更新插件")
@PostMapping("/update/id")
@RequiresPermissions("plugin:upload")
public Map<String, Object> update(@PathVariable("id") Long id, @RequestParam("file") MultipartFile file) throws Exception{
if (pluginService.uninstall(id)) {
return pluginService.localInstall(file);
}
return null;
}
} }