Nuevos graficos
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* js/api.js
|
||||
* Centraliza la comunicación con el Backend (Vercel Serverless Function)
|
||||
* Centraliza la comunicación con el Backend (Netlify Functions)
|
||||
*/
|
||||
|
||||
export const api = {
|
||||
@@ -11,6 +11,7 @@ export const api = {
|
||||
* @param {boolean} forceRefresh - Forzar bypassing de la caché del backend
|
||||
*/
|
||||
async fetchDashboardData(forceRefresh = false, period = '90d') {
|
||||
// Para Netlify Functions + Redirección en netlify.toml
|
||||
let url = `/api/data?period=${period}`;
|
||||
if (forceRefresh) url += '&refresh=1';
|
||||
|
||||
@@ -28,4 +29,4 @@ export const api = {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user