forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits

getInstanceHomework.ts13 lines, 546 bytesHistoryRawDownload
1import { client } from "../client";
2import { normalizePage, pageQuery, type Page, type PageParams } from "../client";
3import type { Homework } from "../client";
4
5/** A student sees only the homework they are assigned, `assigned` narrowed to themselves. */
6export async function getInstanceHomework(
7 instanceId: string,
8 params?: PageParams,
9 signal?: AbortSignal,
10): Promise<Page<Homework>> {
11 const data = await client<unknown>(`/instances/${instanceId}/homework${pageQuery(params)}`, { signal });
12 return normalizePage<Homework>(data);
13}