12 lines
		
	
	
		
			386 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			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;
 | |
| }
 |