Gestion de apis

This commit is contained in:
Tatiana Villa 2026-02-06 10:27:35 +01:00
parent 5202b768c5
commit ce16ed90c3
1 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ async function loadStats() {
async function loadStatsToday() { async function loadStatsToday() {
try { try {
const response = await fetch(API_URL_TODAY); const response = await fetch(API_URL);
if (!response.ok) throw new Error("Error cargando datos: " + response.status); if (!response.ok) throw new Error("Error cargando datos: " + response.status);
const data = await response.json(); const data = await response.json();
@ -67,7 +67,7 @@ function renderLastData(data) {
$("last-wind").textContent = last.viento_velocidad + " km/h"; $("last-wind").textContent = last.viento_velocidad + " km/h";
$("last-sunrise").textContent = last.amanecer; $("last-sunrise").textContent = last.amanecer;
$("last-sunset").textContent = last.anochecer; $("last-sunset").textContent = last.anochecer;
} }
// ==================== // ====================
// Estadísticas del mes seleccionado // Estadísticas del mes seleccionado