wip: youtube activity

This commit is contained in:
swve 2023-05-14 15:38:43 +02:00
parent 97c540bcca
commit ddc8e38277
5 changed files with 74 additions and 22 deletions

View file

@ -36,6 +36,12 @@ export async function createFileActivity(file: File, type: string, data: any, ch
return res;
}
export async function createYouTubeVideoActivity(data: any, activity: any, chapter_id: any) {
const result = await fetch(`${getAPIUrl()}activities/youtubevideo?coursechapter_id=${chapter_id}`, RequestBody("POST", data));
const res = await result.json();
return res;
}
export async function getActivity(activity_id: any) {
const result = await fetch(`${getAPIUrl()}activities/${activity_id}`, RequestBody("GET", null));
const res = await result.json();