forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits

postInstanceHomework.ts17 lines, 633 bytesHistoryRawDownload
1import { client } from "../client";
2import type { Homework } from "../client";
3
4export 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
15export function postInstanceHomework(instanceId: string, body: PostInstanceHomeworkBody): Promise<Homework> {
16 return client<Homework>(`/instances/${instanceId}/homework`, { method: "POST", body });
17}