fix(系统管理-插件管理): 优化更新插件api

This commit is contained in:
fit2cloud-chenyw 2022-08-24 17:23:02 +08:00
parent d963c92a7c
commit fe853e7d1c

View File

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