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