From a547f3a5596a744a2c0d149c04b01f2666a33645 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Mon, 13 Mar 2023 17:30:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A5=E5=8F=A3=E5=9C=BA=E6=99=AF=E5=85=A8?= =?UTF-8?q?=E9=80=89url=E5=A4=9A=E4=BA=86=E4=B8=AA=E5=88=86=E9=9A=94?= =?UTF-8?q?=E7=AC=A6=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1024334 --user=宋天阳 【接口测试】github #22615接口自动化导入全部场景,出现接口404 https://www.tapd.cn/55049933/s/1348977 Closes #22615 --- api-test/frontend/src/api/scenario.js | 2 +- workstation/frontend/src/api/scenario.js | 80 ++++++++++++------------ 2 files changed, 40 insertions(+), 42 deletions(-) diff --git a/api-test/frontend/src/api/scenario.js b/api-test/frontend/src/api/scenario.js index 38dc711c43..4d202809e7 100644 --- a/api-test/frontend/src/api/scenario.js +++ b/api-test/frontend/src/api/scenario.js @@ -55,7 +55,7 @@ export function deleteBatchByCondition(params) { } export function apiScenarioAll(params) { - return post('/api/automation/id/all/', params); + return post('/api/automation/id/all', params); } export function getApiScenarios(params) { diff --git a/workstation/frontend/src/api/scenario.js b/workstation/frontend/src/api/scenario.js index 919c73ec91..1ba8330fd3 100644 --- a/workstation/frontend/src/api/scenario.js +++ b/workstation/frontend/src/api/scenario.js @@ -1,156 +1,154 @@ -import {get, post, request} from 'metersphere-frontend/src/plugins/request' +import { get, post } from "metersphere-frontend/src/plugins/request"; export function getScenarioById(scenarioId) { - return get('/api/automation/get/' + scenarioId); + return get("/api/automation/get/" + scenarioId); } export function getScenarioWithBLOBsById(scenarioId) { - return get('/api/automation/scenario-details/' + scenarioId); + return get("/api/automation/scenario-details/" + scenarioId); } export function getScenarioList(currentPage, pageSize, condition) { - let url = '/api/automation/list/' + currentPage + '/' + pageSize; + let url = "/api/automation/list/" + currentPage + "/" + pageSize; return post(url, condition); } export function getScenarioByTrash(condition) { - return post('/api/automation/list/all/trash', condition); + return post("/api/automation/list/all/trash", condition); } export function getScenarioByProjectId(projectId) { - return get('/api/automation/env-project-ids/' + projectId); + return get("/api/automation/env-project-ids/" + projectId); } export function checkScenarioEnv(scenarioId) { - return get('/api/automation/env-valid' + scenarioId); + return get("/api/automation/env-valid" + scenarioId); } export function execStop(reportId) { - return get('/api/automation/stop/' + reportId); + return get("/api/automation/stop/" + reportId); } export function execBatchStop(res) { - return post('/api/automation/stop/batch', res); + return post("/api/automation/stop/batch", res); } export function getFollowByScenarioId(scenarioId) { - return get('/api/automation/follow/' + scenarioId); + return get("/api/automation/follow/" + scenarioId); } export function getScenarioVersions(scenarioId) { - return get('/api/automation/versions/' + scenarioId); + return get("/api/automation/versions/" + scenarioId); } export function delByScenarioId(scenarioId) { - return get('/api/automation/delete/' + scenarioId); + return get("/api/automation/delete/" + scenarioId); } export function delByScenarioIdAndRefId(scenarioId, refId) { - return get('/api/automation/delete/' + scenarioId + '/' + refId); + return get("/api/automation/delete/" + scenarioId + "/" + refId); } export function deleteBatchByCondition(params) { - return post('/api/automation/del-batch', params); + return post("/api/automation/del-batch", params); } export function apiScenarioAll(params) { - return post('/api/automation/id/all/', params); + return post("/api/automation/id/all", params); } export function getApiScenarios(params) { - return post('/api/automation/get-scenario-list', params); + return post("/api/automation/get-scenario-list", params); } export function getReference(params) { - return post('/api/automation/getReference', params); + return post("/api/automation/getReference", params); } export function genPerformanceTestJmx(params) { - return post('/api/automation/gen-jmx', params); + return post("/api/automation/gen-jmx", params); } export function apiScenarioEnv(params) { - return post('/api/automation/env', params); + return post("/api/automation/env", params); } export function getApiScenarioProjectIdByConditions(params) { - return post('/api/automation/list-project-ids', params); + return post("/api/automation/list-project-ids", params); } export function createSchedule(params) { - return post('/api/automation/schedule/create', params); + return post("/api/automation/schedule/create", params); } export function updateSchedule(params) { - return post('/api/automation/schedule/update', params); + return post("/api/automation/schedule/update", params); } export function setScenarioDomain(params) { - return post('/api/automation/set-domain', params); + return post("/api/automation/set-domain", params); } export function listWithIds(params) { - return post('/api/automation/list-blobs', params); + return post("/api/automation/list-blobs", params); } export function getApiScenarioEnv(params) { - return post('/api/automation/scenario-env', params); + return post("/api/automation/scenario-env", params); } export function batchEditScenario(params) { - return post('/api/automation/batch/edit', params); + return post("/api/automation/batch/edit", params); } export function batchCopyScenario(params) { - return post('/api/automation/batch/copy', params); + return post("/api/automation/batch/copy", params); } export function updateScenarioEnv(params) { - return post('/api/automation/batch/update/env', params); + return post("/api/automation/batch/update/env", params); } export function scenarioPlan(params) { - return post('/api/automation/scenario/plan', params); + return post("/api/automation/scenario/plan", params); } export function runBatch(params) { - return post('/api/automation/run/batch', params); + return post("/api/automation/run/batch", params); } export function scenarioRun(params) { - return post('/api/automation/run', params); + return post("/api/automation/run", params); } export function scenarioReduction(params) { - return post('/api/automation/reduction', params); + return post("/api/automation/reduction", params); } export function scenarioAllIds(params) { - return post('/api/automation/id/all', params); + return post("/api/automation/id/all", params); } export function checkBeforeDelete(params) { - return post('/api/automation/get-del-details', params); + return post("/api/automation/get-del-details", params); } export function removeScenarioToGcByBatch(params) { - return post('/api/automation/move-gc-batch', params); + return post("/api/automation/move-gc-batch", params); } export function exportScenario(params) { - return post('/api/automation/export', params); + return post("/api/automation/export", params); } export function batchGenPerformanceTestJmx(params) { - return post('/api/automation/gen-jmx-batch', params); + return post("/api/automation/gen-jmx-batch", params); } export function updateScenarioFollows(id, params) { - return post('/api/automation/update/follows/' + id, params); + return post("/api/automation/update/follows/" + id, params); } export function getScenarioReference(params) { - return post('/api/automation/getReference', params); + return post("/api/automation/getReference", params); } - -