mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: Add User Courses in Profile
This commit is contained in:
parent
31c27bb70e
commit
b1aec48947
6 changed files with 233 additions and 8 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue