mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-19 11:39:36 +02:00
Update bookmark. Changes to CSS. Changes to WeatherJob
This commit is contained in:
parent
519b6d0746
commit
96aa1f7d69
11 changed files with 165 additions and 36 deletions
|
@ -30,7 +30,7 @@ const getExternalWeather = async () => {
|
|||
|
||||
// Save weather data
|
||||
const cursor = res.data.current;
|
||||
await Weather.create({
|
||||
const weatherData = await Weather.create({
|
||||
externalLastUpdate: cursor.last_updated,
|
||||
tempC: cursor.temp_c,
|
||||
tempF: cursor.temp_f,
|
||||
|
@ -38,10 +38,9 @@ const getExternalWeather = async () => {
|
|||
conditionText: cursor.condition.text,
|
||||
conditionCode: cursor.condition.code
|
||||
});
|
||||
return weatherData;
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.log('External API request failed');
|
||||
return;
|
||||
throw new Error('External API request failed');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue