remove query params from path param if present
This commit is contained in:
parent
1c668e5892
commit
0675b26dad
2
mod.ts
2
mod.ts
|
@ -198,7 +198,7 @@ export class HTTPServer {
|
||||||
(accum: { [key: string]: string }, curr: RouteParam) => {
|
(accum: { [key: string]: string }, curr: RouteParam) => {
|
||||||
return {
|
return {
|
||||||
...accum,
|
...accum,
|
||||||
[curr.paramKey]: routeSegments[curr.idx],
|
[curr.paramKey]: routeSegments[curr.idx].replace(/(?!\/)\W\D.*/gm, ""),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
|
|
Reference in New Issue
Block a user