feat(web): require login only for candidates and system

This commit is contained in:
kairee committed 2026-11-01 03:09:21 +08:00
1 parent 55c40db047
commit 6aefe9ce87
6 files changed
+130 -32

No files matched your search

+7
View File
@@ -50,3 +50,10 @@ export async function health() {
const payload = await response.json();
return payload?.data ?? payload;
}
export async function session() {
const response = await fetch("/api/session", { credentials: "same-origin" });
if (!response.ok) throw new ApiError("无法连接看板服务", response.status);
const payload = await response.json();
return payload?.data ?? payload;
}