mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: implement course edition
This commit is contained in:
parent
8c860a9516
commit
b582eaacfc
3 changed files with 154 additions and 19 deletions
|
|
@ -24,6 +24,12 @@ export async function getCourseMetadataWithAuthHeader(course_id: any, next: any,
|
|||
return res;
|
||||
}
|
||||
|
||||
export async function updateCourse(course_id: any, data: any) {
|
||||
const result: any = await fetch(`${getAPIUrl()}courses/course_${course_id}`, RequestBody("PUT", data, null));
|
||||
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));
|
||||
const res = await errorHandling(result);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue