hezarfen_frontend
Clone
https://git.tahinli.com/Hezarfen/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits
| 1 | import { client } from "../client"; |
| 2 | import type { AttemptAnswer } from "../client"; |
| 3 | |
| 4 | export type PostExamAttemptAnswerBody = { |
| 5 | question_id: string; |
| 6 | selected?: string | null; // choice id |
| 7 | text?: string | null; |
| 8 | }; |
| 9 | |
| 10 | export function postExamAttemptAnswer( |
| 11 | examId: string, |
| 12 | body: PostExamAttemptAnswerBody, |
| 13 | ): Promise<AttemptAnswer> { |
| 14 | return client<AttemptAnswer>(`/exams/${examId}/attempt/answers`, { method: "POST", body }); |
| 15 | } |