hezarfen_frontend
Clone
https://git.tahinli.com/archive/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 { 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. |
| 8 | export 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 | } |