feat: courses dashboard

This commit is contained in:
swve 2023-12-13 15:56:12 +01:00
parent 8d35085908
commit c39d9d5340
22 changed files with 611 additions and 67 deletions

View file

@ -1,4 +1,4 @@
import { OrderPayload } from "@components/Dashboard/EditCourseStructure/EditCourseStructure";
import { OrderPayload } from "@components/DashboardPages/EditCourseStructure/EditCourseStructure";
import { getAPIUrl } from "@services/config/config";
import { RequestBody, RequestBodyWithAuthHeader, errorHandling } from "@services/utils/ts/requests";

View file

@ -25,7 +25,7 @@ export async function getCourseMetadataWithAuthHeader(course_uuid: any, next: an
}
export async function updateCourse(course_uuid: any, data: any) {
const result: any = await fetch(`${getAPIUrl()}courses/course_${course_uuid}`, RequestBody("PUT", data, null));
const result: any = await fetch(`${getAPIUrl()}courses/${course_uuid}`, RequestBody("PUT", data, null));
const res = await errorHandling(result);
return res;
}