From 33f854b20303fe1b28dfd378430af6a593769246 Mon Sep 17 00:00:00 2001 From: ernstmul Date: Mon, 28 Oct 2024 09:32:09 +0100 Subject: [PATCH] Don't await the mailing list result, and don't redirect to onboarding but straight to console --- src/routes/+page.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/routes/+page.ts b/src/routes/+page.ts index dbeb30a93..0b6cd287a 100644 --- a/src/routes/+page.ts +++ b/src/routes/+page.ts @@ -12,7 +12,7 @@ const handleGithubEducationMembership = async (name: string, email: string) => { `${base}/education/error?message=${result.error.message}&code=${result.error.code}` ); } else if (result && '$createdAt' in result) { - await sdk.forConsole.billing.setMailinglist('gh-student', name, email); + sdk.forConsole.billing.setMailinglist('gh-student', name, email); } }; @@ -28,9 +28,8 @@ export const load: PageLoad = async ({ parent, url }) => { if (userVisitedEducationPage()) { await handleGithubEducationMembership(account.name, account.email); - } - - if (organizations.total) { + redirect(303, base); + } else if (organizations.total) { const teamId = account.prefs.organization ?? organizations.teams[0].$id; if (!teamId) { redirect(303, `${base}/account/organizations${url.search}`);