MCPcopy
hub / github.com/parse-community/parse-server / makeRoutablePath

Function makeRoutablePath

src/batch.js:28–34  ·  view source on GitHub ↗
(requestPath)

Source from the content-addressed store, hash-verified

26 let apiPrefix = originalUrl.slice(0, apiPrefixLength);
27
28 const makeRoutablePath = function (requestPath) {
29 // The routablePath is the path minus the api prefix
30 if (requestPath.slice(0, apiPrefix.length) != apiPrefix) {
31 throw new Parse.Error(Parse.Error.INVALID_JSON, 'cannot route batch path ' + requestPath);
32 }
33 return path.posix.join('/', requestPath.slice(apiPrefix.length));
34 };
35
36 if (serverURL && publicServerURL && serverURL.pathname != publicServerURL.pathname) {
37 const localPath = serverURL.pathname;

Callers 3

handleBatchFunction · 0.85
batchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected