forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits

getInsightByUserId.ts12 lines, 545 bytesHistoryRawDownload
1import { client } from "../client";
2import 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 */
10export function getInsightByUserId(userId: string, signal?: AbortSignal): Promise<StudentInsight> {
11 return client<StudentInsight>(`/insights/students/${encodeURIComponent(userId)}`, { signal });
12}