CLASSROOMIO-T-45: Handle domains not found
This commit is contained in:
@@ -98,11 +98,10 @@
|
|||||||
// Set user in sentry
|
// Set user in sentry
|
||||||
Sentry.setUser($profile);
|
Sentry.setUser($profile);
|
||||||
|
|
||||||
const orgRes = await getOrganizations($profile.id);
|
|
||||||
|
|
||||||
if ($appStore.isStudentDomain) {
|
if ($appStore.isStudentDomain) {
|
||||||
// student redirect
|
// student redirect
|
||||||
} else {
|
} else {
|
||||||
|
const orgRes = await getOrganizations($profile.id);
|
||||||
// If user coming to login page, then
|
// If user coming to login page, then
|
||||||
if (isEmpty(orgRes.orgs)) {
|
if (isEmpty(orgRes.orgs)) {
|
||||||
goto(ROUTE.ONBOARDING);
|
goto(ROUTE.ONBOARDING);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
export const blockedSubdomain = [
|
export const blockedSubdomain = [
|
||||||
'app',
|
'app',
|
||||||
'apps',
|
'apps',
|
||||||
|
'play',
|
||||||
'support',
|
'support',
|
||||||
'help',
|
'help',
|
||||||
'teachers',
|
'teachers',
|
||||||
|
|||||||
@@ -141,8 +141,14 @@ export async function getCourseBySiteName(siteName) {
|
|||||||
if (error) {
|
if (error) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
const org = get(data, '[0].group.organization', {
|
||||||
currentOrg.set(get(data, '[0].group.organization'));
|
id: '',
|
||||||
|
name: 'ClassroomIO',
|
||||||
|
shortName: '',
|
||||||
|
siteName: '',
|
||||||
|
avatar_url: '/logo-192.png',
|
||||||
|
});
|
||||||
|
currentOrg.set(org);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user