hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits
| 1 | import { client } from "../client"; |
| 2 | import type { Course, CourseKind } from "../client"; |
| 3 | |
| 4 | /** |
| 5 | * A catalog row teaches nobody by itself — a şube attaches it |
| 6 | * (`postClassInstance`), which is what mints the instance students sit in. |
| 7 | */ |
| 8 | export type PostCourseBody = { |
| 9 | title: string; |
| 10 | description?: string | null; |
| 11 | kind?: CourseKind | null; |
| 12 | }; |
| 13 | |
| 14 | export function postCourse(body: PostCourseBody): Promise<Course> { |
| 15 | return client<Course>("/courses", { method: "POST", body }); |
| 16 | } |