forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB4e0a329Burak Boduroğlu2 months ago537 commits

postClassCourse.ts11 lines, 492 bytesHistoryRawDownload
1import { client } from "../client";
2import type { ClassCourse } from "../client";
3
4export 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.
9export function postClassCourse(classId: string, body: AttachCourseBody): Promise<ClassCourse> {
10 return client<ClassCourse>(`/classes/${classId}/courses`, { method: "POST", body });
11}