MCPcopy Create free account
hub / github.com/fastify/fastify / findRoute

Function findRoute

lib/route.js:180–198  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

178 }
179
180 function findRoute (options) {
181 const route = router.find(
182 options.method,
183 options.url || '',
184 options.constraints
185 )
186 if (route) {
187 // we must reduce the expose surface, otherwise
188 // we provide the ability for the user to modify
189 // all the route and server information in runtime
190 return {
191 handler: route.handler,
192 params: route.params,
193 searchParams: route.searchParams
194 }
195 } else {
196 return null
197 }
198 }
199
200 /**
201 * Route management

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected