MCPcopy Index your code
hub / github.com/bugy/script-server / loadFiles

Function loadFiles

web-src/src/main-app/store/scriptConfig.js:426–439  ·  view source on GitHub ↗
(scriptConfig, parameterName, path)

Source from the content-addressed store, hash-verified

424}
425
426function loadFiles(scriptConfig, parameterName, path) {
427 if (isNull(scriptConfig)) {
428 throw Error('Config is not available');
429 }
430
431 const encodedScript = encodeURIComponent(scriptConfig.name);
432 const encodedParameter = encodeURIComponent(parameterName);
433 const url = `scripts/${encodedScript}/${encodedParameter}/list-files`;
434 const param = toQueryArgs({'path': path, 'id': scriptConfig.id});
435 const full_url = url + '?' + param;
436
437 return axiosInstance.get(full_url)
438 .then(({data}) => data);
439}

Callers 1

_preprocessParameterFunction · 0.85

Calls 3

isNullFunction · 0.90
toQueryArgsFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected