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 { Homework } from "../client"; |
| 3 | |
| 4 | export type PostInstanceHomeworkBody = { |
| 5 | title: string; |
| 6 | description?: string | null; |
| 7 | /** One of the catalog course's subjects — required. */ |
| 8 | subject_id: string; |
| 9 | /** Required and must be in the future. */ |
| 10 | due_at: number; |
| 11 | /** Omit, null or [] assigns the whole enrolled roster; a subset caps at 200. */ |
| 12 | assigned?: string[] | null; |
| 13 | }; |
| 14 | |
| 15 | export function postInstanceHomework(instanceId: string, body: PostInstanceHomeworkBody): Promise<Homework> { |
| 16 | return client<Homework>(`/instances/${instanceId}/homework`, { method: "POST", body }); |
| 17 | } |