Files
ElyOffice/site/src/release.ts
T
ZacharyZhang-NYandClaude Opus 5.5 854c360ea1 Site: show downloads across every release [skip ci]
/release.json adds the sum of every release asset's downloads; the
update manifests are the apps' checks, not downloads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 13:43:38 -04:00

12 lines
491 B
TypeScript

// Gitea redirects this to the newest release.
export const RELEASES = "https://git.zacharyzhang.com/ZacharyZhang-NY/ElyOffice/releases/latest";
export type Release = { version: string; downloads: number };
/** The newest release and all downloads, from the worker. */
export async function latest(): Promise<Release> {
const res = await fetch("/release.json");
if (!res.ok) throw new Error(`release.json: ${res.status} ${await res.text()}`);
return (await res.json()) as Release;
}