Quellcode durchsuchen

fix: 修改流水线配置请求为body形式

370774330@qq.com vor 5 Jahren
Ursprung
Commit
4f25a6bfa7

+ 6 - 13
web/src/main/java/seecoder/devcloud/web/controller/pipeline/PipelineController.java

@@ -10,10 +10,7 @@ import org.springframework.web.bind.annotation.*;
 import seecoder.devcloud.common.exceptions.AccessDeniedException;
 import seecoder.devcloud.common.exceptions.ServiceException;
 import seecoder.devcloud.web.model.vo.Response;
-import seecoder.devcloud.web.model.vo.pipeline.PipelineConfigVO;
-import seecoder.devcloud.web.model.vo.pipeline.PipelineCreateVO;
-import seecoder.devcloud.web.model.vo.pipeline.PipelineHistoryVO;
-import seecoder.devcloud.web.model.vo.pipeline.PipelineInfoVO;
+import seecoder.devcloud.web.model.vo.pipeline.*;
 import seecoder.devcloud.web.service.pipeline.PipelineService;
 
 import java.util.List;
@@ -76,15 +73,11 @@ public class PipelineController {
 
     @PutMapping("/config")
     @ApiOperation(value = "保存修改一条流水线的json配置信息", httpMethod = "PUT")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "projectId", dataType ="int",paramType = "query"),
-            @ApiImplicitParam(name = "pipelineId", dataType ="int",paramType = "query"),
-            @ApiImplicitParam(name = "configJson", dataType = "string",paramType = "query")
-    })
-    public Response savePipelineConfig(@RequestParam("projectId")Integer projectId,
-                                       @RequestParam("pipelineId")Integer pipelineId,
-                                       @RequestParam("configJson")String configJson) throws AccessDeniedException {
-        pipelineService.savePipelineConfig(projectId,pipelineId, configJson);
+
+    @ApiImplicitParam(name = "pipelineUpdateConfigVO", dataType ="object",paramType = "body")
+
+    public Response savePipelineConfig(@RequestBody PipelineUpdateConfigVO pipelineUpdateConfigVO) throws AccessDeniedException {
+        pipelineService.savePipelineConfig(pipelineUpdateConfigVO);
         return Response.buildSuccess();
     }