hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits
| 1 | import { client } from "../client"; |
| 2 | import { normalizePage, pageQuery, type Page, type PageParams } from "../client"; |
| 3 | import type { Instance } from "../client"; |
| 4 | |
| 5 | /** |
| 6 | * The instances the caller may act in or see: a student's şube memberships, a |
| 7 | * homeroom teacher's, plus the instances a teacher was assigned to run. One |
| 8 | * rule for what is "theirs", shared with every instance-scoped gate. |
| 9 | */ |
| 10 | export async function getMyInstances(params?: PageParams, signal?: AbortSignal): Promise<Page<Instance>> { |
| 11 | const data = await client<unknown>(`/instances/me${pageQuery(params)}`, { signal }); |
| 12 | return normalizePage<Instance>(data); |
| 13 | } |