hezarfen_frontend
Clone
https://git.tahinli.com/Hezarfen/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits
| 1 | import { client } from "../client"; |
| 2 | import type { ClassGroup } from "../client"; |
| 3 | |
| 4 | // Omit a field to keep it; send null on year/teacher_id to clear/unlink it. The |
| 5 | // grade is required on every class, so `grade_level` can be reset, never cleared. |
| 6 | export type UpdateClassBody = { |
| 7 | name?: string; |
| 8 | grade_level?: number; |
| 9 | /** The academic year (`getAcademicYears`) the şube sits in. */ |
| 10 | year?: string | null; |
| 11 | teacher_id?: string | null; |
| 12 | }; |
| 13 | |
| 14 | export function patchClassById(id: string, body: UpdateClassBody): Promise<ClassGroup> { |
| 15 | return client<ClassGroup>(`/classes/${id}`, { method: "PATCH", body }); |
| 16 | } |