hezarfen_frontend
Clone
https://git.tahinli.com/Hezarfen/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits
| 1 | import { client } from "../client"; |
| 2 | import { appendPageParams, normalizePage, type Page, type PageParams } from "../client"; |
| 3 | import type { CourseNote } from "../client"; |
| 4 | |
| 5 | export 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 | } |