forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB0069847Burak Boduroğlu2 months ago552 commits

getCourseEnrollments.ts12 lines, 456 bytesHistoryRawDownload
1import { client } from "../client";
2import { normalizePage, pageQuery, type Page, type PageParams } from "../client";
3import type { Enrollment } from "../client";
4
5export async function getCourseEnrollments(
6 courseId: string,
7 params?: PageParams,
8 signal?: AbortSignal,
9): Promise<Page<Enrollment>> {
10 const data = await client<unknown>(`/courses/${courseId}/enrollments${pageQuery(params)}`, { signal });
11 return normalizePage<Enrollment>(data);
12}