aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/services
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2021-10-25 13:17:30 -0700
committerGitHub <noreply@github.com>2021-10-25 13:17:30 -0700
commitb7480f632e65b0434c2acc63a171db7a99c7abc4 (patch)
treee5260c6c8ff7d15886be6cdb2ca1244ceec637e7 /src/components/services
parentcf33747f4272baf124b99af9ed8efcca07d1d6b9 (diff)
parent9fce0ce5a5a2cce2d99c60cbd59def14156ebeef (diff)
downloadhomer-b7480f632e65b0434c2acc63a171db7a99c7abc4.tar.gz
homer-b7480f632e65b0434c2acc63a171db7a99c7abc4.tar.zst
homer-b7480f632e65b0434c2acc63a171db7a99c7abc4.zip
Merge pull request #316 from robinschneider/apikey
Fixes apikey inconsistency
Diffstat (limited to 'src/components/services')
-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 09ff76a..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) {