fix: show notification on error fetching marks #116

This commit is contained in:
Rotimi Best
2023-12-19 21:10:21 +03:00
parent cdd4f65d79
commit 4b2e58b1de
2 changed files with 11 additions and 4 deletions
@@ -1,7 +1,7 @@
import { supabase } from '$lib/utils/functions/supabase';
export async function fetchMarks(courseId) {
const { data } = await supabase.rpc('get_marks').eq('course_id', courseId);
const { data, error } = await supabase.rpc('get_marks').eq('course_id', courseId);
return { data };
return { data, error };
}