mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: init new edit course page
This commit is contained in:
parent
187f75e583
commit
8d35085908
28 changed files with 891 additions and 159 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import { OrderPayload } from "@components/Dashboard/EditCourseStructure/EditCourseStructure";
|
||||
import { getAPIUrl } from "@services/config/config";
|
||||
import { RequestBody, RequestBodyWithAuthHeader, errorHandling } from "@services/utils/ts/requests";
|
||||
|
||||
|
|
@ -25,6 +26,12 @@ export async function updateChapter(coursechapter_id: any, data: any) {
|
|||
return res;
|
||||
}
|
||||
|
||||
export async function updateCourseOrderStructure(course_uuid: any, data: OrderPayload) {
|
||||
const result: any = await fetch(`${getAPIUrl()}chapters/course/${course_uuid}/order`, RequestBody("PUT", data, null));
|
||||
const res = await errorHandling(result);
|
||||
return res;
|
||||
}
|
||||
|
||||
export async function createChapter(data: any) {
|
||||
const result: any = await fetch(`${getAPIUrl()}chapters/`, RequestBody("POST", data, null));
|
||||
const res = await errorHandling(result);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue