forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

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

postCourseExam.ts22 lines, 558 bytesHistoryRawDownload
1import { client } from "./client";
2import type { Exam } from "./types";
3
4export type PostCourseExamBody = {
5 title: string;
6 description?: string | null;
7 kind: string;
8 mode?: string | null;
9 starts_at?: number | null;
10 ends_at?: number | null;
11 duration_ms?: number | null;
12 max_attempts?: number | null;
13 allow_rejoin?: boolean | null;
14 draft?: boolean | null;
15};
16
17export function postCourseExam(
18 courseId: string,
19 body: PostCourseExamBody,
20): Promise<Exam> {
21 return client<Exam>(`/courses/${courseId}/exams`, { method: "POST", body });
22}