hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits
| 1 | import { client } from "../client"; |
| 2 | import type { ExamQuestion } from "../client"; |
| 3 | |
| 4 | /** |
| 5 | * Re-copy the question's bank template over it — the escape hatch for a copy that |
| 6 | * drifted from its template (a bank↔exam copy is deep, never a live link). Only |
| 7 | * for a question that still has `from_bank`; the backend refuses with 409 once |
| 8 | * any attempt exists, and 400 when there is no template to refresh from. |
| 9 | */ |
| 10 | export function postExamQuestionRefreshFromBank( |
| 11 | examId: string, |
| 12 | questionId: string, |
| 13 | ): Promise<ExamQuestion> { |
| 14 | return client<ExamQuestion>(`/exams/${examId}/questions/${questionId}/refresh-from-bank`, { |
| 15 | method: "POST", |
| 16 | }); |
| 17 | } |