Add webui

This commit is contained in:
Ethan O'Brien
2024-04-24 19:05:20 -05:00
parent 9dc8aaf550
commit a05e7a8478
22 changed files with 5116 additions and 1 deletions

18
webui/src/Request.jsx Normal file
View File

@@ -0,0 +1,18 @@
const serverUrl = "";
async function api(url, body) {
try {
let options = body ? {method: "POST", body: JSON.stringify(body)} : {}
const resp = await fetch(serverUrl + url, options);
const text = await resp.text();
return JSON.parse(text);
} catch(e) {
return {
result: "ERR",
message: e.message
}
}
}
export default api;