hezarfen_frontend
Clone
https://git.tahinli.com/Hezarfen/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits
| 1 | import { client } from "../client"; |
| 2 | import type { StudentInsight } from "../client"; |
| 3 | |
| 4 | /** |
| 5 | * One student's insight as an observer reads it. Teacher+ narrowed to the |
| 6 | * students they reach, or a parent holding a live link to that student; |
| 7 | * everyone else gets the same 404 a missing id gets, so a refusal must not be |
| 8 | * shown as "forbidden". |
| 9 | */ |
| 10 | export function getInsightByUserId(userId: string, signal?: AbortSignal): Promise<StudentInsight> { |
| 11 | return client<StudentInsight>(`/insights/students/${encodeURIComponent(userId)}`, { signal }); |
| 12 | } |