forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

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

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