This commit is contained in:
m0rph3us1987
2026-02-05 23:18:26 +01:00
parent b0206e58e0
commit 3eb654a354

View File

@@ -15,7 +15,9 @@ class ApiService {
}
async getState(): Promise<CTFState> {
const res = await fetch(`${API_BASE}/state`);
const res = await fetch(`${API_BASE}/state`, {
headers: this.getHeaders()
});
if (!res.ok) throw new Error(`HTTP Error ${res.status}`);
return res.json();
}
@@ -190,3 +192,4 @@ class ApiService {
}
export const api = new ApiService();