hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiB249dfedBurak Boduroğlu4 months ago164 commits
| 1 | import { client } from "./client"; |
| 2 | import type { ExamQuestion, QuestionKind } from "./types"; |
| 3 | |
| 4 | export type ExamQuestionBody = { |
| 5 | subject_id: string; |
| 6 | text: string; |
| 7 | kind: QuestionKind; |
| 8 | points: number; |
| 9 | choices?: string[] | null; |
| 10 | correct?: number | null; |
| 11 | }; |
| 12 | |
| 13 | export function postExamQuestion(examId: string, body: ExamQuestionBody): Promise<ExamQuestion> { |
| 14 | return client<ExamQuestion>(`/exams/${examId}/questions`, { method: "POST", body }); |
| 15 | } |