forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB249dfedBurak Boduroğlu4 months ago164 commits

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