// const API_BASE = import.meta.env.VITE_API_BASE || "http://localhost:8000"; const API_BASE = import.meta.env.VITE_API_BASE || ""; export async function getSkyData(lat, lon, time) { const res = await fetch(`${API_BASE}/api/sky`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ latitude: lat, longitude: lon, time: time, }), }); if (!res.ok) throw new Error("API error"); return res.json(); }