mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-11 00:38:28 +03:00
Change URLs to use the JS URL constructor consistently across codebase.
Fixes #281
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
export function CreateURLWithParams(url: string, params: Record<string, string>) {
|
||||
const u = new URL(url);
|
||||
|
||||
for (const key in params) {
|
||||
u.searchParams.set(key, params[key]);
|
||||
}
|
||||
|
||||
return u;
|
||||
}
|
||||
Reference in New Issue
Block a user