forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

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

getBoardEpochs.ts16 lines, 585 bytesHistoryRawDownload
1import { client, normalizePage, pageQuery, type Page, type PageParams } from "../client";
2import type { StrokeRow } from "./types";
3
4// The epoch index: every clear marker (each carries the closed epoch + its
5// final stroke count), oldest first. The open epoch is deliberately absent.
6export async function getBoardEpochs(
7 id: string,
8 params?: PageParams,
9 signal?: AbortSignal,
10): Promise<Page<StrokeRow>> {
11 const data = await client<unknown>(
12 `/boards/${encodeURIComponent(id)}/epochs${pageQuery(params)}`,
13 { signal },
14 );
15 return normalizePage<StrokeRow>(data);
16}