mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
address comment.
This commit is contained in:
1 parent
aec6519053
commit
c613ab94ac
1 file changed
+4
-4
@@ -46,7 +46,7 @@ export const load: LayoutLoad = async ({ depends, url, route }) => {
|
||||
return {
|
||||
mfaRequired: true
|
||||
};
|
||||
redirect(303, withParams(`${base}/mfa`, url));
|
||||
redirect(303, withParams(`${base}/mfa`, url.searchParams));
|
||||
}
|
||||
|
||||
if (!isPublicRoute) {
|
||||
@@ -54,13 +54,13 @@ export const load: LayoutLoad = async ({ depends, url, route }) => {
|
||||
checkPricingRefAndRedirect(url.searchParams, true);
|
||||
}
|
||||
|
||||
redirect(303, withParams(`${base}/login`, url));
|
||||
redirect(303, withParams(`${base}/login`, url.searchParams));
|
||||
}
|
||||
};
|
||||
|
||||
function withParams(pathname: string, url: URL): string {
|
||||
const { searchParams } = url;
|
||||
function withParams(pathname: string, searchParams: URLSearchParams): string {
|
||||
const redirect = searchParams.get('redirect');
|
||||
|
||||
if (redirect) {
|
||||
const extras = new URLSearchParams(searchParams);
|
||||
extras.delete('redirect');
|
||||
|
||||
Reference in new issue
Block a user