system-praktyk-front/src/management/api/course.ts
2021-01-18 00:22:57 +01:00

12 lines
386 B
TypeScript

import { Course } from "@/data";
import { sampleCourse } from "@/provider/dummy";
import { axios } from "@/api";
import { EditionDTO, editionDtoTransformer } from "@/api/dto/edition";
const COURSE_INDEX_ENDPOINT = "/management/course";
export async function all(): Promise<Course[]> {
const response = await axios.get<Course[]>(COURSE_INDEX_ENDPOINT);
return response.data;
}