Graph fixes
This commit is contained in:
@@ -56,15 +56,13 @@ app.get('/api/current', async (req, res) => {
|
||||
const space = getCelestialCurrent(coords.latitude, coords.longitude)
|
||||
const condition = getWeatherCondition(Object.assign(sensors, space))
|
||||
|
||||
console.time();
|
||||
const forecast = await getForecast();
|
||||
console.timeEnd();
|
||||
console.log(forecast);
|
||||
const merged = {
|
||||
...(forecast?.summary ? {
|
||||
precipitation_chance: forecast.summary.precipitation_chance,
|
||||
temperature_max: forecast.summary.temperature_max,
|
||||
temperature_min: forecast.summary.temperature_min,
|
||||
uv_index_max: forecast.summary.uv_index,
|
||||
} : {}),
|
||||
...condition,
|
||||
...sensors,
|
||||
|
||||
Reference in New Issue
Block a user