(options)
| 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 |
nothing calls this directly
no outgoing calls
no test coverage detected