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

Method tryRouteRequest

src/PromiseRouter.js:121–130  ·  view source on GitHub ↗
(method, path, request)

Source from the content-addressed store, hash-verified

119 }
120
121 tryRouteRequest(method, path, request) {
122 var match = this.match(method, path);
123 if (!match) {
124 throw new Parse.Error(Parse.Error.INVALID_JSON, 'cannot route ' + method + ' ' + path);
125 }
126 request.params = match.params;
127 return new Promise((resolve, reject) => {
128 match.handler(request).then(resolve, reject);
129 });
130 }
131}
132
133// A helper function to make an express handler out of a a promise

Callers 2

batchFunction · 0.80
handleRequestFunction · 0.80

Calls 2

matchMethod · 0.95
handlerMethod · 0.45

Tested by

no test coverage detected