forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB249dfedBurak Boduroğlu4 months ago164 commits

getUserMarks.ts10 lines, 377 bytesHistoryRawDownload
1import { client } from "./client";
2import type { MarksReport } from "./types";
3
4function userKey(userId: string): string {
5 return userId.includes(":") ? userId.split(":").pop()! : userId;
6}
7
8export function getUserMarks(userId: string, signal?: AbortSignal): Promise<MarksReport> {
9 return client<MarksReport>(`/marks/${encodeURIComponent(userKey(userId))}`, { signal });
10}