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 | /** Omit to keep; an explicit null clears the field back to inherit. */ |
| 5 | export type UpdateOfferingBody = Partial<{ |
| 6 | title: string | null; |
| 7 | description: string | null; |
| 8 | default_ders_saati: number | null; |
| 9 | default_counts_toward_karne: boolean | null; |
| 10 | }>; |
| 11 | |
| 12 | // Manager+. Sections without their own override follow the change at once. |
| 13 | export function patchOfferingById(id: string, body: UpdateOfferingBody): Promise<Offering> { |
| 14 | return client<Offering>(`/offerings/${id}`, { method: "PATCH", body }); |
| 15 | } |