fix: causal lab — URL relative /api (pas localhost:8000)
This commit is contained in:
@@ -64,7 +64,7 @@ interface CalibRow {
|
|||||||
// ── API ───────────────────────────────────────────────────────────────────────
|
// ── API ───────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
const api = async (path: string, opts?: RequestInit) => {
|
const api = async (path: string, opts?: RequestInit) => {
|
||||||
const r = await fetch(`http://localhost:8000${path}`, opts)
|
const r = await fetch(path, opts)
|
||||||
if (!r.ok) { const t = await r.text(); throw new Error(t) }
|
if (!r.ok) { const t = await r.text(); throw new Error(t) }
|
||||||
return r.json()
|
return r.json()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user