hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiB7122d71Burak Boduroğlu4 months ago419 commits
| 1 | import { client } from "../client"; |
| 2 | import type { Exam } from "../client"; |
| 3 | |
| 4 | export type PostCourseExamBody = { |
| 5 | title: string; |
| 6 | description?: string | null; |
| 7 | kind: string; |
| 8 | mode?: string | null; |
| 9 | starts_at?: number | null; |
| 10 | ends_at?: number | null; |
| 11 | duration_ms?: number | null; |
| 12 | max_attempts?: number | null; |
| 13 | allow_rejoin?: boolean | null; |
| 14 | allow_review?: boolean | null; |
| 15 | draft?: boolean | null; |
| 16 | }; |
| 17 | |
| 18 | export function postCourseExam( |
| 19 | courseId: string, |
| 20 | body: PostCourseExamBody, |
| 21 | ): Promise<Exam> { |
| 22 | return client<Exam>(`/courses/${courseId}/exams`, { method: "POST", body }); |
| 23 | } |