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:
parent
df6d96f5b6
commit
3d3e2eed8c
4 changed files with 45 additions and 19 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue