forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

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

getMyInstances.ts13 lines, 633 bytesHistoryRawDownload
1import { client } from "../client";
2import { normalizePage, pageQuery, type Page, type PageParams } from "../client";
3import 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 */
10export 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}