feat: Add User Courses in Profile

This commit is contained in:
swve 2025-04-06 12:12:01 +02:00
parent 31c27bb70e
commit b1aec48947
6 changed files with 233 additions and 8 deletions

View file

@ -25,6 +25,14 @@ export async function getUserByUsername(username: string, access_token?: string)
return res
}
export async function getCoursesByUser(user_id: string, access_token?: string) {
const result = await fetch(
`${getAPIUrl()}users/${user_id}/courses`,
access_token ? RequestBodyWithAuthHeader('GET', null, null, access_token) : RequestBody('GET', null, null)
)
const res = await getResponseMetadata(result)
return res
}
export async function updateUserAvatar(
user_uuid: any,
avatar_file: any,