CLASSROOMIO-T-152: Student can join any course via invite link

This commit is contained in:
Rotimi Best
2023-09-14 12:47:26 +01:00
parent c07c119b5b
commit 14f58792f6
17 changed files with 320 additions and 137 deletions
+5 -3
View File
@@ -7,7 +7,8 @@ export const ROUTE = {
COURSE: '/course',
LOGIN: '/login',
SIGN_UP: '/signup',
INVITE_SIGNUP: '/invite',
INVITE_TEACHER: '/invite/t',
INVITE_STUDENT: '/invite/s',
PROFILE: '/profile',
PEOPLE: '/people',
DISCUSSIONS: '/discussions',
@@ -20,7 +21,7 @@ export const PUBLIC_ROUTES = [
`^${ROUTE.HOME}$`,
ROUTE.LOGIN,
ROUTE.SIGN_UP,
`^${ROUTE.INVITE_SIGNUP}/.*`,
`^${ROUTE.INVITE_TEACHER}/.*`,
ROUTE.FORGOT,
ROUTE.RESET,
`^${ROUTE.PAGES}/.*`,
@@ -31,7 +32,8 @@ export const PUBLIC_ROUTES = [
export const ROUTES_TO_HIDE_NAV = [
ROUTE.LOGIN,
ROUTE.SIGN_UP,
`^${ROUTE.INVITE_SIGNUP}/.*`,
`^${ROUTE.INVITE_TEACHER}/.*`,
`^${ROUTE.INVITE_STUDENT}/.*`,
ROUTE.FORGOT,
ROUTE.RESET,
ROUTE.ONBOARDING
+8
View File
@@ -0,0 +1,8 @@
import { supabase } from '$lib/utils/functions/supabase';
import type { Profile } from '$lib/components/Course/components/People/types';
export async function getProfile(email: string): Promise<Profile | null> {
const { data } = await supabase.from('profile').select('*').eq('email', email).single();
console.log('getProfile data', data);
return data;
}
+1
View File
@@ -64,6 +64,7 @@ export interface Group {
updated_at?: string;
organization_id?: string /* foreign key to organization.id */;
organization?: Organization;
tutors: Profile[];
}
export interface Role {