forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

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

getCourseNotes.ts10 lines, 523 bytesHistoryRawDownload
1import { client } from "../client";
2import { appendPageParams, normalizePage, type Page, type PageParams } from "../client";
3import type { CourseNote } from "../client";
4
5export async function getCourseNotes(courseId: string, params?: PageParams, signal?: AbortSignal): Promise<Page<CourseNote>> {
6 const query = new URLSearchParams({ course: courseId });
7 appendPageParams(query, params);
8 const data = await client<unknown>(`/course-notes?${query.toString()}`, { signal });
9 return normalizePage<CourseNote>(data);
10}