Take attendance + fix point count
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
import { supabase } from '../../functions/supabase';
|
||||
|
||||
export async function takeAttendance(update) {
|
||||
return supabase.from('group_attendance').upsert(update);
|
||||
}
|
||||
@@ -36,7 +36,8 @@ export async function fetchCourse(courseId, session) {
|
||||
lessons:lesson(
|
||||
id, title,public, lesson_at, call_url, is_complete,created_at,
|
||||
profile:teacher_id(id, avatar_url, fullname)
|
||||
)
|
||||
),
|
||||
attendance:group_attendance(*)
|
||||
`
|
||||
)
|
||||
.match({ id: courseId })
|
||||
@@ -45,7 +46,8 @@ export async function fetchCourse(courseId, session) {
|
||||
if (!data || error) {
|
||||
console.log(`data`, data);
|
||||
console.log(`fetchCourse => error`, error);
|
||||
return this.redirect(301, '/courses');
|
||||
// return this.redirect(301, '/courses');
|
||||
return;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user