refactor(接口测试): 优化获取协议页面脚本接口
This commit is contained in:
parent
50139a84ac
commit
31c9897746
|
@ -63,7 +63,7 @@ public class ApiTestService {
|
|||
PluginWrapper pluginWrapper = pluginLoadService.getPluginWrapper(pluginId);
|
||||
checkResourceExist(pluginWrapper);
|
||||
if (pluginWrapper.getPlugin() instanceof AbstractProtocolPlugin protocolPlugin) {
|
||||
return pluginLoadService.getPluginScriptContent(pluginId, protocolPlugin.getApiProtocolScriptId());
|
||||
return pluginLoadService.getPluginScript(pluginId, protocolPlugin.getApiProtocolScriptId());
|
||||
} else {
|
||||
// 插件不存在或者非接口插件,抛出异常
|
||||
return checkResourceExist(null);
|
||||
|
|
|
@ -259,6 +259,10 @@ public class PluginLoadService {
|
|||
return getPluginScriptConfig(pluginId, scriptId).get("script");
|
||||
}
|
||||
|
||||
public Object getPluginScript(String pluginId, String scriptId) {
|
||||
return getPluginScriptConfig(pluginId, scriptId);
|
||||
}
|
||||
|
||||
public PluginWrapper getPluginWrapper(String id) {
|
||||
return msPluginManager.getPlugin(id);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue