Actualizar frontend/src/lib/api.js
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
// Cliente del backend FastAPI de Leads (puerto 8001).
|
// Cliente del backend FastAPI de Leads (puerto 8001).
|
||||||
const BASE_URL = "http://localhost:8001";
|
const BASE_URL = import.meta.env.VITE_API_URL || "https://dashboardapi-leads.escueladerefrigeracion.lat";
|
||||||
|
|
||||||
// ── Cache en memoria (frontend) con TTL 15 min y "stale-while-revalidate" ──
|
// ── Cache en memoria (frontend) con TTL 15 min y "stale-while-revalidate" ──
|
||||||
// Guarda la respuesta de cada GET (por path+params). Al volver a pedir:
|
// Guarda la respuesta de cada GET (por path+params). Al volver a pedir:
|
||||||
// - si hay dato vigente (< 15 min) -> lo devuelve al instante, SIN fetch.
|
// - si hay dato vigente (< 15 min) -> lo devuelve al instante, SIN fetch.
|
||||||
|
|||||||
Reference in New Issue
Block a user