hezarfen_frontend
Clone
https://git.tahinli.com/Hezarfen/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits
| 1 | import { client } from "../client"; |
| 2 | import { normalizePage, pageQuery, type Page, type PageParams } from "../client"; |
| 3 | import type { Homework } from "../client"; |
| 4 | |
| 5 | /** A student sees only the homework they are assigned, `assigned` narrowed to themselves. */ |
| 6 | export 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 | } |