forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits

getExamReviewQuestions.ts16 lines, 611 bytesHistoryRawDownload
1import { client } from "@/api/client";
2import { normalizePage, pageQuery, type Page, type PageParams } from "@/api/client";
3import 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. */
6export 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}