Merge pull request #2931 from dataease/pr@dev@fix_plugin_update

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

View File

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