diff --git a/client/src/components/Settings/AppDetails/AuthForm/AuthForm.tsx b/client/src/components/Settings/AppDetails/AuthForm/AuthForm.tsx index 4c568387002a0f250413ac889f98ccf5e1bc857f..2742d76eb75a32b182b061ef0e7a017db70b20df 100644 --- a/client/src/components/Settings/AppDetails/AuthForm/AuthForm.tsx +++ b/client/src/components/Settings/AppDetails/AuthForm/AuthForm.tsx @@ -79,8 +79,6 @@ export const AuthForm = (): JSX.Element => { setFormData({ ...formData, duration: e.target.value }) } > - - diff --git a/utils/clearWeatherData.js b/utils/clearWeatherData.js index 5e4972a94ac54a709d6c246847931d8f6221ec12..df8873c44d86814fbdf5f2cddaa3e5a736dcdccb 100644 --- a/utils/clearWeatherData.js +++ b/utils/clearWeatherData.js @@ -1,12 +1,7 @@ const { Op } = require('sequelize'); const Weather = require('../models/Weather'); -const Logger = require('./Logger'); -const logger = new Logger(); -const loadConfig = require('./loadConfig'); const clearWeatherData = async () => { - const { WEATHER_API_KEY: secret } = await loadConfig(); - const weather = await Weather.findOne({ order: [['createdAt', 'DESC']], }); @@ -20,10 +15,6 @@ const clearWeatherData = async () => { }, }); } - - if (secret) { - logger.log('Old weather data was deleted'); - } }; module.exports = clearWeatherData; diff --git a/utils/jobs.js b/utils/jobs.js index 9716af0e7123fe2b003ee8c8adf3439c9766e397..0ce328425781944d63e120d821508ea753f2ea28 100644 --- a/utils/jobs.js +++ b/utils/jobs.js @@ -15,7 +15,7 @@ const weatherJob = schedule.scheduleJob( try { const weatherData = await getExternalWeather(); - logger.log('Weather updated'); + Sockets.getSocket('weather').socket.send(JSON.stringify(weatherData)); } catch (err) { if (secret) {