refactor(api): unify /api contract across frontend, nginx, and backend
Some checks failed
CI / build-and-test (pull_request) Has been cancelled

This commit is contained in:
Anton
2026-04-08 11:59:46 +03:00
parent 9f63b190f1
commit 8eaf006906
17 changed files with 103 additions and 81 deletions

View File

@@ -0,0 +1,21 @@
const STORAGE_KEY = "calendar_run.backendVersion.v1";
export function readCachedBackendVersion(): string | null {
try {
const raw = sessionStorage.getItem(STORAGE_KEY);
return raw !== null && raw.trim().length > 0 ? raw.trim() : null;
} catch {
return null;
}
}
export function writeCachedBackendVersion(version: string): void {
try {
if (version === "недоступна" || version === "не указана") {
return;
}
sessionStorage.setItem(STORAGE_KEY, version);
} catch {
// private mode / quota
}
}