chore: login/signup improvements

This commit is contained in:
Rotimi Best
2023-12-11 21:18:31 +03:00
parent bd12bcbcfc
commit bbe6e78f88
6 changed files with 13 additions and 10 deletions
+3 -2
View File
@@ -1,3 +1,4 @@
import { dev } from '$app/environment';
import { redirect } from '@sveltejs/kit';
import { blockedSubdomain } from '$lib/utils/constants/app';
import { getCurrentOrg } from '$lib/utils/services/org';
@@ -37,12 +38,12 @@ export const load = async ({ url, cookies }): Promise<LoadOutput> => {
response.orgSiteName = debugMode ? _orgSiteName : subdomain;
response.org = (await getCurrentOrg(response.orgSiteName, true)) || null;
if (!response.org) {
if (!response.org && !dev) {
throw redirect(301, 'https://app.classroomio.com/404?type=org');
}
} else if (subdomain === 'play' || debugPlay === 'true') {
response.skipAuth = true;
} else if (subdomain !== 'app') {
} else if (subdomain !== 'app' && !dev) {
throw redirect(301, 'https://app.classroomio.com');
}