FIX 2 ^^
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user