fix types
This commit is contained in:
parent
d4075a6bb5
commit
ef5a205bda
|
@ -118,7 +118,7 @@ export class HTTPServer {
|
||||||
const routeParamsMap: RouteParam[] = extractRouteParams(route.path);
|
const routeParamsMap: RouteParam[] = extractRouteParams(route.path);
|
||||||
const routeSegments: string[] = filepath.split("/");
|
const routeSegments: string[] = filepath.split("/");
|
||||||
routeRequest.pathParams = routeParamsMap.reduce(
|
routeRequest.pathParams = routeParamsMap.reduce(
|
||||||
(accum: { [key: string]: string | number }, curr: RouteParam) => {
|
(accum: { [key: string]: string }, curr: RouteParam) => {
|
||||||
return {
|
return {
|
||||||
...accum,
|
...accum,
|
||||||
[curr.paramKey]: routeSegments[curr.idx],
|
[curr.paramKey]: routeSegments[curr.idx],
|
||||||
|
|
Reference in New Issue
Block a user