feat: add user owned courses page

This commit is contained in:
swve 2024-11-03 00:41:41 +01:00
parent 9f1d8c58d1
commit 0e97580747
7 changed files with 188 additions and 15 deletions

View file

@ -53,4 +53,13 @@ export async function getOrgCustomers(orgId: number, access_token: string) {
);
const res = await errorHandling(result);
return res;
}
export async function getOwnedCourses(orgId: number, access_token: string) {
const result = await fetch(
`${getAPIUrl()}payments/${orgId}/courses/owned`,
RequestBodyWithAuthHeader('GET', null, null, access_token)
);
const res = await errorHandling(result);
return res;
}