feat: add activity page

This commit is contained in:
swve 2023-01-22 19:12:12 +01:00
parent 032f8334ec
commit 85ac324927
6 changed files with 180 additions and 6 deletions

View file

@ -29,3 +29,12 @@ export async function maskLectureAsComplete(org_id: string, course_id: string, l
.catch((error) => console.log("error", error));
return result;
}
// get all activities
export async function getActivities(org_id: string) {
const result: any = await fetch(`${getAPIUrl()}activity/${org_id}/activities`, RequestBody("GET", null))
.then((result) => result.json())
.catch((error) => console.log("error", error));
return result;
}

View file

@ -11,3 +11,4 @@ export const RequestBody = (method: string, data: any) => {
}
return options;
};