Tile windowing system
This commit is contained in:
parent
c6e6c5ca48
commit
43318fb8cd
35 changed files with 4659 additions and 360 deletions
|
|
@ -18,7 +18,6 @@ export interface PowerData {
|
|||
|
||||
export async function getPower(): Promise<PowerData> {
|
||||
const res = await fetch("/api/power");
|
||||
if (res.status === 401) throw new Error("UNAUTHORIZED");
|
||||
if (!res.ok) throw new Error(`Failed to fetch power: ${res.status}`);
|
||||
return res.json() as Promise<PowerData>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,10 +51,6 @@ export interface Stats {
|
|||
export async function getStats(): Promise<Stats> {
|
||||
const res = await fetch("/api/stats");
|
||||
|
||||
if (res.status === 401) {
|
||||
throw new Error("UNAUTHORIZED");
|
||||
}
|
||||
|
||||
if (!res.ok) throw new Error(`Failed to fetch stats: ${res.status}`);
|
||||
return res.json() as Promise<Stats>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue