CLASSROOMIO-T-95: Upload to S3 and Muse AI
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export default () => Date.now().toString(36) + Math.random().toString(36).substr(2);
|
||||
@@ -108,7 +108,7 @@ async function cloneLessons(lessons: Lesson[], courseId: Course['id']) {
|
||||
public: lesson.public,
|
||||
slide_url: lesson.slide_url,
|
||||
title: lesson.title,
|
||||
video_url: lesson.video_url
|
||||
videos: lesson.videos
|
||||
}));
|
||||
|
||||
const { data } = await supabase.from('lesson').insert(clonedLessons).select();
|
||||
|
||||
@@ -34,7 +34,7 @@ export async function fetchCourse(courseId?: Course['id'], slug?: Course['slug']
|
||||
certificate_theme,
|
||||
lessons:lesson(
|
||||
id, title,public, lesson_at, call_url, is_unlocked, is_complete, order, created_at,
|
||||
note, video_url, slide_url, call_url, totalExercises:exercise(count),
|
||||
note, videos, slide_url, call_url, totalExercises:exercise(count),
|
||||
profile:teacher_id(id, avatar_url, fullname)
|
||||
),
|
||||
attendance:group_attendance(*)
|
||||
@@ -150,7 +150,7 @@ export function deleteGroupMember(groupMemberId: Groupmember['id']) {
|
||||
export function fetchLesson(lessonId: Lesson['id']) {
|
||||
return supabase
|
||||
.from('lesson')
|
||||
.select(`id, note, video_url, slide_url, call_url, totalExercises:exercise(count)`)
|
||||
.select(`id, note, videos, slide_url, call_url, totalExercises:exercise(count)`)
|
||||
.eq('id', lessonId)
|
||||
.single();
|
||||
}
|
||||
|
||||
@@ -136,9 +136,29 @@ export interface Group_attendance {
|
||||
groupmember?: Groupmember;
|
||||
}
|
||||
|
||||
enum VideoType {
|
||||
youtube,
|
||||
muse
|
||||
}
|
||||
export interface LessonPage {
|
||||
id?: string | null;
|
||||
totalExercises: Number;
|
||||
is_complete: Boolean;
|
||||
materials: {
|
||||
note: string;
|
||||
slide_url: string;
|
||||
videos: Array<{
|
||||
type: string;
|
||||
link: string;
|
||||
metadata?: {};
|
||||
}>;
|
||||
};
|
||||
exercises: [];
|
||||
}
|
||||
|
||||
export interface Lesson {
|
||||
note?: any; // type unknown;
|
||||
video_url?: any; // type unknown;
|
||||
videos?: []; // type unknown;
|
||||
slide_url?: any; // type unknown;
|
||||
course_id: string /* foreign key to course.id */;
|
||||
id?: string /* primary key */;
|
||||
|
||||
Reference in New Issue
Block a user