mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
wip: youtube activity
This commit is contained in:
parent
97c540bcca
commit
ddc8e38277
5 changed files with 74 additions and 22 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue