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 | import type { MarksReport } from "../client"; |
| 3 | |
| 4 | function userKey(userId: string): string { |
| 5 | return userId.includes(":") ? userId.split(":").pop()! : userId; |
| 6 | } |
| 7 | |
| 8 | export function getUserMarks(userId: string, signal?: AbortSignal): Promise<MarksReport> { |
| 9 | return client<MarksReport>(`/marks/${encodeURIComponent(userKey(userId))}`, { signal }); |
| 10 | } |