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 | |
| 3 | /** The school behind the session cookie: its registry uuid and display name, nothing more. */ |
| 4 | export 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 | */ |
| 13 | export function getSchool(signal?: AbortSignal): Promise<SchoolIdentity> { |
| 14 | return client<SchoolIdentity>("/school", { signal }); |
| 15 | } |