fix(项目设置): 环境添加脚本时从API定义导入脚本失败

--bug=1018224 --user=李玉号 【项目设置】项目环境-环境中-添加全局前/后置脚本-选择API测试-从API定义导入失败
https://www.tapd.cn/55049933/s/1264173
This commit is contained in:
shiziyuan9527 2022-10-17 15:04:39 +08:00 committed by lyh
parent 259b4ab918
commit 0dd84e128e
2 changed files with 5 additions and 5 deletions

View File

@ -137,9 +137,9 @@ export function jsonGenerator(params) {
export function getUserDefaultApiType() { export function getUserDefaultApiType() {
if (currentModuleName === 'api') { if (currentModuleName === 'api') {
return get('/api/module/getUserDefaultApiType'); return get('/api/module/default-type');
} }
return get('/environment/relate/api/module/getUserDefaultApiType'); return get('/environment/relate/api/module/default-type');
} }
export function getModuleByUrl(url) { export function getModuleByUrl(url) {

View File

@ -25,7 +25,7 @@ public class EnvironmentRelateController {
@PostMapping("/api/definition/list/batch") @PostMapping("/api/definition/list/batch")
public Object listBatch(@RequestBody Object obj) { public Object listBatch(@RequestBody Object obj) {
return microService.postForData(MicroServiceName.API_TEST, "/api/definition/generator", obj); return microService.postForData(MicroServiceName.API_TEST, "/api/definition/list/batch", obj);
} }
@PostMapping("/api/testcase/list-blobs") @PostMapping("/api/testcase/list-blobs")
@ -38,9 +38,9 @@ public class EnvironmentRelateController {
return microService.postForData(MicroServiceName.API_TEST, "/api/definition/generator", obj); return microService.postForData(MicroServiceName.API_TEST, "/api/definition/generator", obj);
} }
@GetMapping("/api/module/getUserDefaultApiType") @GetMapping("/api/module/default-type")
public Object getUserDefaultApiType() { public Object getUserDefaultApiType() {
return microService.getForData(MicroServiceName.API_TEST, "/api/module/getUserDefaultApiType/"); return microService.getForData(MicroServiceName.API_TEST, "/api/module/default-type");
} }
@PostMapping("/api/definition/list/{goPage}/{pageSize}") @PostMapping("/api/definition/list/{goPage}/{pageSize}")