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 { |
| 3 | normalizePage, |
| 4 | pageQuery, |
| 5 | type Page, |
| 6 | type PageParams, |
| 7 | type ScheduleWindowParams, |
| 8 | } from "../client"; |
| 9 | import type { Event } from "../client"; |
| 10 | |
| 11 | export async function getEvents( |
| 12 | params?: PageParams & ScheduleWindowParams, |
| 13 | signal?: AbortSignal |
| 14 | ): Promise<Page<Event>> { |
| 15 | const data = await client<unknown>(`/events${pageQuery(params)}`, { signal }); |
| 16 | return normalizePage<Event>(data); |
| 17 | } |