This commit is contained in:
sylvain.chateau 2024-09-10 23:05:35 +02:00
parent 408ed1e317
commit 99d3767a5b

View file

@ -26,16 +26,14 @@ const getExternalWeather = async () => {
isDay: Boolean(cursor.is_day),
cloud: cursor.cloud_cover,
conditionText: '',
conditionCode: 1, // cursor.weathercode
conditionCode: cursor.weathercode,
humidity: cursor.relative_humidity_2m,
windK: cursor.wind_speed_10m,
windM: cursor.wind_speed_10m,
});
return weatherData;
} catch (err) {
// TODO to update
throw new Error(err);
//throw new Error('External API request failed');
throw new Error('External API request failed');
}
};