This commit is contained in:
admin
2026-02-21 10:51:25 +09:00
parent 584530937b
commit 3b028b8fc0
25 changed files with 1852 additions and 244 deletions

View File

@@ -4,10 +4,20 @@ async function apiGet(path, params = {}) {
const query = new URLSearchParams(params).toString();
const url = `${API_BASE}${path}?${query}`;
console.log(`📡 API GET: ${url}`);
const res = await fetch(url);
console.log(`📊 Response status: ${res.status}`);
if (!res.ok) {
const data = await res.json();
console.error(`❌ API Error:`, data);
throw new Error(data.detail || "APIエラー");
}
return res.json();
const jsonData = await res.json();
console.log(`✅ API Response:`, jsonData);
return jsonData;
}