forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

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

getMyCourses.ts11 lines, 623 bytesHistoryRawDownload
1import { client } from "../client";
2import { normalizePage, pageQuery, type Page, type PageParams } from "../client";
3import type { CourseSectionRef } from "../client";
4
5// One row per class section the caller reaches (şube roster, homeroom, taught,
6// or a hand-placed enrollment) — `id` is the instance id, never the catalog
7// course's; `course` names the catalog row.
8export async function getMyCourses(params?: PageParams, signal?: AbortSignal): Promise<Page<CourseSectionRef>> {
9 const data = await client<unknown>(`/courses/me${pageQuery(params)}`, { signal });
10 return normalizePage<CourseSectionRef>(data);
11}