1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-19 11:39:36 +02:00

Fixed bug with weather logging. Fixed bug with search bar shortcuts

This commit is contained in:
Paweł Malak 2021-10-26 14:37:01 +02:00
parent df6d96f5b6
commit 3d3e2eed8c
4 changed files with 45 additions and 19 deletions

View file

@ -5,14 +5,6 @@ const loadConfig = require('./loadConfig');
const getExternalWeather = async () => {
const { WEATHER_API_KEY: secret, lat, long } = await loadConfig();
if (!secret) {
throw new Error('API key was not found. Weather updated failed');
}
if (!lat || !long) {
throw new Error('Location was not found. Weather updated failed');
}
// Fetch data from external API
try {
const res = await axios.get(