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