update: better check.

This commit is contained in:
ItzNotABug committed 2024-07-12 14:25:10 +05:30
1 parent 35b54f8d69
commit b30626a5ee
2 files changed
+7 -4

No files matched your search

+7 -1
View File
@@ -70,7 +70,13 @@
'/hackathon',
'/mfa'
];
const acceptedAuthenticatedRoutes = ['/console', '/invite', '/card', '/hackathon'];
const acceptedAuthenticatedRoutes = [
'/console',
'/invite',
'/card',
'/hackathon',
'/recover'
];
const pathname = $page.url.pathname;
const user = $page.data.account as Models.User<Record<string, string>>;
-3
View File
@@ -17,9 +17,6 @@ export const load: LayoutLoad = async ({ depends, url }) => {
url.searchParams.delete('forceRedirect');
}
// logged-in user can recover-password!
if (url.pathname === '/recover') return {};
try {
const account = await sdk.forConsole.account.get<{ organization?: string }>();