forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

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

getUserKarne.ts12 lines, 551 bytesHistoryRawDownload
1import { client } from "../client";
2import type { KarneReport } from "../client";
3
4/**
5 * Another user's karne. Requires teacher+, or a parent tied to the student.
6 * An exactly-teacher caller sees only the lines of the instances they run,
7 * with the average recomputed over those and no verdict.
8 */
9export function getUserKarne(userId: string, term?: string, signal?: AbortSignal): Promise<KarneReport> {
10 const query = term ? `?term=${encodeURIComponent(term)}` : "";
11 return client<KarneReport>(`/marks/karne/${userId}${query}`, { signal });
12}