Added config editor in front end
All checks were successful
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 2m46s
CI / Windows Release Package (push) Has been skipped

This commit is contained in:
Aiden
2026-05-30 19:33:40 +10:00
parent f0f8b080ca
commit 8ffc011ca0
26 changed files with 1201 additions and 55 deletions

View File

@@ -5,3 +5,21 @@ export function postJson(path, payload) {
body: JSON.stringify(payload),
});
}
export async function fetchJson(path) {
const response = await fetch(path);
const body = await response.json();
if (!response.ok) {
throw new Error(body?.error || `Request failed: ${response.status}`);
}
return body;
}
export async function postJsonResult(path, payload) {
const response = await postJson(path, payload);
const body = await response.json();
if (!response.ok || body?.ok === false) {
throw new Error(body?.error || `Request failed: ${response.status}`);
}
return body;
}