hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiB0069847Burak Boduroğlu2 months ago552 commits
| 1 | import { client } from "../client"; |
| 2 | import type { CourseSession } from "../client"; |
| 3 | |
| 4 | /** Omitted fields keep their value. Only `ends_at` clears on explicit null. */ |
| 5 | export type PatchSessionBody = { |
| 6 | topic?: string; |
| 7 | teacher_id?: string; |
| 8 | starts_at?: number; |
| 9 | ends_at?: number | null; |
| 10 | }; |
| 11 | |
| 12 | export function patchSessionById(id: string, body: PatchSessionBody): Promise<CourseSession> { |
| 13 | return client<CourseSession>(`/sessions/${id}`, { method: "PATCH", body }); |
| 14 | } |