mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
refactor: improve perf on the frontend
This commit is contained in:
parent
5e7ae54215
commit
744e372f4e
8 changed files with 61 additions and 51 deletions
|
|
@ -41,13 +41,13 @@ export async function searchOrgCourses(
|
|||
}
|
||||
|
||||
export async function getCourseMetadata(
|
||||
course_uuid: any,
|
||||
course_uuid: string,
|
||||
next: any,
|
||||
access_token: string
|
||||
access_token: string | null | undefined
|
||||
) {
|
||||
const result = await fetch(
|
||||
`${getAPIUrl()}courses/course_${course_uuid}/meta`,
|
||||
RequestBodyWithAuthHeader('GET', null, next, access_token)
|
||||
RequestBodyWithAuthHeader('GET', null, next, access_token || undefined)
|
||||
)
|
||||
const res = await errorHandling(result)
|
||||
return res
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue