Iapetus / frontend /src /api.js
EphAsad's picture
Upload 9972 files
01fdca8 verified
Raw
History Blame Contribute Delete
467 Bytes
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || "";
export async function fetchFullReport(payload) {
const response = await fetch(`${API_BASE_URL}/predict/full-report`, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
});
if (!response.ok) {
const detail = await response.text();
throw new Error(detail || "Prediction request failed");
}
return response.json();
}