feat: add minimal frontend (accounts, trial balance)
This commit is contained in:
10
frontend/js/api.js
Normal file
10
frontend/js/api.js
Normal file
@@ -0,0 +1,10 @@
|
||||
const API_BASE = "http://localhost:18080";
|
||||
|
||||
async function apiGet(path) {
|
||||
const res = await fetch(`${API_BASE}${path}`);
|
||||
if (!res.ok) {
|
||||
const text = await res.text();
|
||||
throw new Error(text || "APIエラー");
|
||||
}
|
||||
return res.json();
|
||||
}
|
||||
Reference in New Issue
Block a user