forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits

postExamAttemptAnswer.ts15 lines, 435 bytesHistoryRawDownload
1import { client } from "../client";
2import type { AttemptAnswer } from "../client";
3
4export type PostExamAttemptAnswerBody = {
5 question_id: string;
6 selected?: string | null; // choice id
7 text?: string | null;
8};
9
10export function postExamAttemptAnswer(
11 examId: string,
12 body: PostExamAttemptAnswerBody,
13): Promise<AttemptAnswer> {
14 return client<AttemptAnswer>(`/exams/${examId}/attempt/answers`, { method: "POST", body });
15}