forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

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

getCourseMembers.ts16 lines, 623 bytesHistoryRawDownload
1import { client } from "../client";
2import { normalizePage, pageQuery, type Page, type PageParams } from "../client";
3import 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 */
9export 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}