mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: migrate course page to server component
This commit is contained in:
parent
9f28dfe7e8
commit
9b224a4331
6 changed files with 286 additions and 255 deletions
|
|
@ -19,6 +19,11 @@ export async function getOrgCoursesWithAuthHeader(org_id: number, next: any, acc
|
|||
return res;
|
||||
}
|
||||
|
||||
export async function getCourseMetadataWithAuthHeader(course_id: any, next: any, access_token: string) {
|
||||
const result = await fetch(`${getAPIUrl()}courses/meta/course_${course_id}`, RequestBodyWithAuthHeader("GET", null, next, access_token));
|
||||
const res = await errorHandling(result);
|
||||
return res;
|
||||
}
|
||||
|
||||
export async function getCourse(course_id: string, next: any) {
|
||||
const result: any = await fetch(`${getAPIUrl()}courses/${course_id}`, RequestBody("GET", null, next));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue