hourly endpoint fix?
This commit is contained in:
@@ -78,7 +78,7 @@ app.get('/api/hourly', async (req, res) => {
|
|||||||
|
|
||||||
const [history, forecast24, forecast3rdParty] = await Promise.all([
|
const [history, forecast24, forecast3rdParty] = await Promise.all([
|
||||||
start.getTime() < now.getTime() ? queryHourly(start, now) : Promise.resolve([]),
|
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([]),
|
end.getTime() > forecastLimit.getTime() ? hourlyWeather(coords.latitude, coords.longitude, forecastLimit, end) : Promise.resolve([]),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user