aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/services/OpenWeather.vue3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/services/OpenWeather.vue b/src/components/services/OpenWeather.vue
index 7352b9b..79d5e37 100644
--- a/src/components/services/OpenWeather.vue
+++ b/src/components/services/OpenWeather.vue
@@ -64,7 +64,8 @@ export default {
64 locationQuery = `q=${this.item.location}`; 64 locationQuery = `q=${this.item.location}`;
65 } 65 }
66 66
67 const url = `https://api.openweathermap.org/data/2.5/weather?${locationQuery}&appid=${this.item.apikey}&units=${this.item.units}`; 67 const apiKey = this.item.apikey || this.item.apiKey;
68 const url = `https://api.openweathermap.org/data/2.5/weather?${locationQuery}&appid=${apiKey}&units=${this.item.units}`;
68 fetch(url) 69 fetch(url)
69 .then((response) => { 70 .then((response) => {
70 if (!response.ok) { 71 if (!response.ok) {