hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits
| 1 | import { client } from "../client"; |
| 2 | import type { CourseSession } from "../client"; |
| 3 | |
| 4 | export type PostInstanceSessionBody = { |
| 5 | topic?: string | null; |
| 6 | /** Defaults to the caller; must hold `teacher` or higher. */ |
| 7 | teacher_id?: string | null; |
| 8 | starts_at: number; |
| 9 | ends_at?: number | null; |
| 10 | }; |
| 11 | |
| 12 | export function postInstanceSession(instanceId: string, body: PostInstanceSessionBody): Promise<CourseSession> { |
| 13 | return client<CourseSession>(`/instances/${instanceId}/sessions`, { method: "POST", body }); |
| 14 | } |