hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits
| 1 | import { client } from "../client"; |
| 2 | import type { BankQuestion, QuestionKind } from "../client"; |
| 3 | |
| 4 | export type BankQuestionBody = { |
| 5 | subject_id: string; |
| 6 | text: string; |
| 7 | kind: QuestionKind; |
| 8 | points: number; |
| 9 | /** Each option carries its key: a known key keeps that option (and its image), any other is new. */ |
| 10 | choices?: { id?: string | null; text: string }[] | null; |
| 11 | /** Choice id — must name one of the submitted choices. */ |
| 12 | correct?: string | null; |
| 13 | }; |
| 14 | |
| 15 | export function postBankQuestion(body: BankQuestionBody): Promise<BankQuestion> { |
| 16 | return client<BankQuestion>(`/bank-questions`, { method: "POST", body }); |
| 17 | } |