1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-25 05:49:36 +02:00

Update bookmark. Changes to CSS. Changes to WeatherJob

This commit is contained in:
unknown 2021-06-01 14:54:47 +02:00
parent 519b6d0746
commit 96aa1f7d69
11 changed files with 165 additions and 36 deletions

View file

@ -4,10 +4,10 @@ const Sockets = require('../Sockets');
const weatherJob = schedule.scheduleJob('updateWeather', '0 */15 * * * *', async () => {
try {
await getExternalWeather();
const weatherData = await getExternalWeather();
console.log('weather updated');
Sockets.getSocket('weather').socket.send('weather updated');
Sockets.getSocket('weather').socket.send(JSON.stringify(weatherData));
} catch (err) {
console.log(err);
console.log(err.message);
}
})