feat(web): require login only for candidates and system
This commit is contained in:
1 parent
55c40db047
commit
6aefe9ce87
6 files changed
+130
-32
No files matched your search
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user