hezarfen_frontend
Clone
https://git.tahinli.com/Hezarfen/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits
| 1 | import { client } from "../client"; |
| 2 | import { normalizePage, pageQuery, type Page, type PageParams } from "../client"; |
| 3 | import type { CourseMembership } from "../client"; |
| 4 | |
| 5 | /** |
| 6 | * A club/etüt's own members — the school-scoped tier. An instance's roster is |
| 7 | * `getInstanceEnrollments`. Requires teacher+ and catalog rights. |
| 8 | */ |
| 9 | export async function getCourseMembers( |
| 10 | courseId: string, |
| 11 | params?: PageParams, |
| 12 | signal?: AbortSignal, |
| 13 | ): Promise<Page<CourseMembership>> { |
| 14 | const data = await client<unknown>(`/courses/${courseId}/members${pageQuery(params)}`, { signal }); |
| 15 | return normalizePage<CourseMembership>(data); |
| 16 | } |