forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB249dfedBurak Boduroğlu4 months ago164 commits

patchExamQuestionById.ts19 lines, 537 bytesHistoryRawDownload
1import { client } from "./client";
2import type { ExamQuestion, QuestionKind } from "./types";
3
4export type PatchExamQuestionBody = {
5 subject_id?: string;
6 text?: string | null;
7 kind?: QuestionKind | null;
8 points?: number | null;
9 choices?: string[] | null;
10 correct?: number | null;
11};
12
13export function patchExamQuestionById(
14 examId: string,
15 questionId: string,
16 body: PatchExamQuestionBody,
17): Promise<ExamQuestion> {
18 return client<ExamQuestion>(`/exams/${examId}/questions/${questionId}`, { method: "PATCH", body });
19}