hourly endpoint fix?

This commit is contained in:
2026-06-26 00:32:39 -04:00
parent 70701483f5
commit 06be7c0b4f

View File

@@ -78,7 +78,7 @@ app.get('/api/hourly', async (req, res) => {
const [history, forecast24, forecast3rdParty] = await Promise.all([
start.getTime() < now.getTime() ? queryHourly(start, now) : Promise.resolve([]),
end.getTime() > now.getTime() ? getForecast().then(s => s.hours.filter(h => new Date(h.time) <= end)) : Promise.resolve([]),
end.getTime() > now.getTime() ? getForecast().then(f => f.slots.filter(h => new Date(h.time) <= end)) : Promise.resolve([]),
end.getTime() > forecastLimit.getTime() ? hourlyWeather(coords.latitude, coords.longitude, forecastLimit, end) : Promise.resolve([]),
])