forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiBd962efeBurak Boduroğlu4 months ago146 commits

postExamQuestion.ts14 lines, 431 bytesHistoryRawDownload
1import { client } from "./client";
2import type { ExamQuestion, QuestionKind } from "./types";
3
4export type ExamQuestionBody = {
5 text: string;
6 kind: QuestionKind;
7 points: number;
8 choices?: string[] | null;
9 correct?: number | null;
10};
11
12export function postExamQuestion(examId: string, body: ExamQuestionBody): Promise<ExamQuestion> {
13 return client<ExamQuestion>(`/exams/${examId}/questions`, { method: "POST", body });
14}