8000 fix: Automatically decode path params · aklinker1/zeta@122bf92 · GitHub
[go: up one dir, main page]

Skip to content

Commit 122bf92

Browse files
committed
fix: Automatically decode path params
1 parent 2556738 commit 122bf92

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎src/internal/utils.ts‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,14 @@ export function getRawParams(
7171
rawParams["**"] = rawParams["_"];
7272
delete rawParams["_"];
7373
}
74-
return rawParams;
74+
75+
// Decode all values automatically
76+
return Object.fromEntries(
77+
Object.entries(rawParams).map(([key, value]) => [
78+
key,
79+
decodeURIComponent(value),
80+
]),
81+
);
7582
}
7683

7784
export function getErrorStack(err: Error): string[] | undefined {

0 commit comments

Comments
 (0)
0