hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits
| 1 | import { client } from "../client"; |
| 2 | import type { Offering } from "../client"; |
| 3 | |
| 4 | export type CreateOfferingBody = { |
| 5 | course: string; |
| 6 | grade_level: number; |
| 7 | title?: string | null; |
| 8 | description?: string | null; |
| 9 | default_ders_saati?: number | null; |
| 10 | default_counts_toward_karne?: boolean | null; |
| 11 | }; |
| 12 | |
| 13 | // Manager+. Only a `course`-kind ders has a grade axis; a second template for |
| 14 | // the same (course, grade) is a 409 `offering_exists`. |
| 15 | export function postOffering(body: CreateOfferingBody): Promise<Offering> { |
| 16 | return client<Offering>("/offerings", { method: "POST", body }); |
| 17 | } |