diff --git a/backend/src/main/java/io/metersphere/api/controller/ApiAutomationController.java b/backend/src/main/java/io/metersphere/api/controller/ApiAutomationController.java index a9610d3a27..f14194c652 100644 --- a/backend/src/main/java/io/metersphere/api/controller/ApiAutomationController.java +++ b/backend/src/main/java/io/metersphere/api/controller/ApiAutomationController.java @@ -192,7 +192,7 @@ public class ApiAutomationController { @PostMapping("/getApiScenarios") public List getApiScenarios(@RequestBody List ids) { - return apiAutomationService.getApiScenarios(ids); + return apiAutomationService.getNewApiScenarios(ids); } @PostMapping(value = "/run/debug") diff --git a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java index 81af380210..7f7302877f 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -728,6 +728,17 @@ public class ApiAutomationService { return new ArrayList<>(); } + public List getNewApiScenarios(List ids) { + List list = new LinkedList<>(); + if (CollectionUtils.isNotEmpty(ids)) { + ids.forEach(item -> { + ApiScenarioDTO dto = this.getNewApiScenario(item); + list.add(dto); + }); + } + return list; + } + public byte[] loadFileAsBytes(FileOperationRequest fileOperationRequest) { if (fileOperationRequest.getId().contains("/") || fileOperationRequest.getName().contains("/")) MSException.throwException(Translator.get("invalid_parameter"));