diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml index fec17fae05..ccc638897d 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml @@ -7,6 +7,6 @@ \ No newline at end of file diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index c8a27f9661..3dacc7a663 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -493,6 +493,9 @@ request.enable === undefined ? request.enable = true : request.enable; request.active = false; request.resourceId = getUUID(); + if (!request.url) { + request.url = ""; + } if (referenced === 'REF' || !request.hashTree) { request.hashTree = []; } @@ -604,7 +607,7 @@ this.getEnvironments(); }, allowDrop(draggingNode, dropNode, type) { - if (ELEMENTS.get(dropNode.data.type).indexOf(draggingNode.data.type) != -1) { + if (dropNode.data.type === draggingNode.data.type || ELEMENTS.get(dropNode.data.type).indexOf(draggingNode.data.type) != -1) { return true; } return false; diff --git a/frontend/src/business/components/api/definition/components/ApiConfig.vue b/frontend/src/business/components/api/definition/components/ApiConfig.vue index b886bf9d60..bceea6b325 100644 --- a/frontend/src/business/components/api/definition/components/ApiConfig.vue +++ b/frontend/src/business/components/api/definition/components/ApiConfig.vue @@ -67,7 +67,7 @@ if (Object.prototype.toString.call(this.currentApi.response).match(/\[object (\w+)\]/)[1].toLowerCase() === 'object') { this.response = this.currentApi.response; } else { - this.response = new ResponseFactory(JSON.parse(this.currentApi.response)); + this.response = JSON.parse(this.currentApi.response); } } else { this.response = {headers: [], body: new Body(), statusCode: [], type: "HTTP"};