refactor: improve perf on the frontend

This commit is contained in:
swve 2025-03-16 15:23:02 +01:00
parent 5e7ae54215
commit 744e372f4e
8 changed files with 61 additions and 51 deletions

View file

@ -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