hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits
| 1 | import { client } from "@/api/client"; |
| 2 | import { normalizePage, pageQuery, type Page, type PageParams } from "@/api/client"; |
| 3 | import type { ExamQuestion } from "@/api/client"; |
| 4 | |
| 5 | /** Self-review question list (with the correct-answer key) for an exam the caller has been marked on. */ |
| 6 | export async function getExamReviewQuestions( |
| 7 | examId: string, |
| 8 | params?: PageParams, |
| 9 | signal?: AbortSignal, |
| 10 | ): Promise<Page<ExamQuestion>> { |
| 11 | const data = await client<unknown>( |
| 12 | `/exams/${encodeURIComponent(examId)}/review/questions${pageQuery(params)}`, |
| 13 | { signal }, |
| 14 | ); |
| 15 | return normalizePage<ExamQuestion>(data); |
| 16 | } |