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

Method match

src/PromiseRouter.js:90–105  ·  view source on GitHub ↗
(method, path)

Source from the content-addressed store, hash-verified

88 // params: any :-params that got parsed from the path
89 // Returns undefined if there is no match.
90 match(method, path) {
91 for (var route of this.routes) {
92 if (route.method != method) {
93 continue;
94 }
95 const layer = route.layer || new Layer(route.path, null, route.handler);
96 const match = layer.match(path);
97 if (match) {
98 const params = layer.params;
99 Object.keys(params).forEach(key => {
100 params[key] = validateParameter(key, params[key]);
101 });
102 return { params: params, handler: route.handler };
103 }
104 }
105 }
106
107 // Mount the routes on this router onto an express app (or express router)
108 mountOnto(expressApp) {

Callers 15

tryRouteRequestMethod · 0.95
configFunction · 0.80
injectDefaultsFunction · 0.80
fromStringFunction · 0.80
RestWrite.jsFile · 0.80
encodeBodyFunction · 0.80
parseSizeToBytesMethod · 0.80
getTypeFunction · 0.80
promiseEnsureIdempotencyFunction · 0.80
validateParameterFunction · 0.80
setChecksMethod · 0.80
getTypeFunction · 0.80

Calls 1

validateParameterFunction · 0.85

Tested by

no test coverage detected