hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiB0069847Burak Boduroğlu2 months ago552 commits
| 1 | import { client } from "../client"; |
| 2 | import type { ClassCourse } from "../client"; |
| 3 | |
| 4 | export type AttachCourseBody = { course_id: string }; |
| 5 | |
| 6 | // Bulk-enrolls the whole roster into the course. Needs course-manage rights |
| 7 | // (403 otherwise); 409 on duplicate, ceiling, or a course too small to seat |
| 8 | // the class. |
| 9 | export function postClassCourse(classId: string, body: AttachCourseBody): Promise<ClassCourse> { |
| 10 | return client<ClassCourse>(`/classes/${classId}/courses`, { method: "POST", body }); |
| 11 | } |