diff options
Diffstat (limited to 'src/routes/(app)/+layout.server.js')
| -rw-r--r-- | src/routes/(app)/+layout.server.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/routes/(app)/+layout.server.js b/src/routes/(app)/+layout.server.js index 0b76c973..1415bdca 100644 --- a/src/routes/(app)/+layout.server.js +++ b/src/routes/(app)/+layout.server.js @@ -15,6 +15,10 @@ export async function load({ cookies, request, url, params }) { } catch (e) {} } + if (user?.needsMigration) { + throw redirect(307, `/migrate`); + } + if (user && ['/', '/login', '/register'].includes(pathname) && request.method === 'GET') { console.log('dashboarding', pathname); throw redirect(307, `/${user.username}/dashboard`); |
