hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits
| 1 | import { client, normalizePage, pageQuery, type Page, type PageParams } from "../client"; |
| 2 | import type { StrokeRow } from "./types"; |
| 3 | |
| 4 | // The live canvas: the current epoch's strokes, oldest first. REST catch-up |
| 5 | // / fallback for the same canvas the socket replays. |
| 6 | export async function getBoardStrokes( |
| 7 | id: string, |
| 8 | params?: PageParams, |
| 9 | signal?: AbortSignal, |
| 10 | ): Promise<Page<StrokeRow>> { |
| 11 | const data = await client<unknown>( |
| 12 | `/boards/${encodeURIComponent(id)}/strokes${pageQuery(params)}`, |
| 13 | { signal }, |
| 14 | ); |
| 15 | return normalizePage<StrokeRow>(data); |
| 16 | } |