forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

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

getSchool.ts15 lines, 485 bytesHistoryRawDownload
1import { client } from "../client";
2
3/** The school behind the session cookie: its registry uuid and display name, nothing more. */
4export type SchoolIdentity = {
5 id: string;
6 name: string;
7};
8
9/**
10 * The caller's own school. Any school role may read it, student and parent
11 * included; a builder cookie names no school and is refused with 401.
12 */
13export function getSchool(signal?: AbortSignal): Promise<SchoolIdentity> {
14 return client<SchoolIdentity>("/school", { signal });
15}