aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRobin Schneider <45321827+robinschneider@users.noreply.github.com>2021-10-25 14:08:31 +0200
committerGitHub <noreply@github.com>2021-10-25 14:08:31 +0200
commit9fce0ce5a5a2cce2d99c60cbd59def14156ebeef (patch)
treee5260c6c8ff7d15886be6cdb2ca1244ceec637e7 /src
parentf2c901a1ec45c91a3fb02333a61bb9d0c82e2859 (diff)
downloadhomer-9fce0ce5a5a2cce2d99c60cbd59def14156ebeef.tar.gz
homer-9fce0ce5a5a2cce2d99c60cbd59def14156ebeef.tar.zst
homer-9fce0ce5a5a2cce2d99c60cbd59def14156ebeef.zip
Update src/components/services/OpenWeather.vue
Co-authored-by: Bastien Wirtz <bastien.wirtz@gmail.com>
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) {