From 487f954a3688f31d5bcc5ba614cde4da3d5deedb Mon Sep 17 00:00:00 2001 From: Robin Schneider Date: Wed, 13 Oct 2021 13:51:39 +0200 Subject: Fixes apikey inconsistency --- src/components/services/OpenWeather.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/components/services/OpenWeather.vue b/src/components/services/OpenWeather.vue index 09ff76a..7352b9b 100644 --- a/src/components/services/OpenWeather.vue +++ b/src/components/services/OpenWeather.vue @@ -64,7 +64,7 @@ export default { locationQuery = `q=${this.item.location}`; } - const url = `https://api.openweathermap.org/data/2.5/weather?${locationQuery}&appid=${this.item.apiKey}&units=${this.item.units}`; + const url = `https://api.openweathermap.org/data/2.5/weather?${locationQuery}&appid=${this.item.apikey}&units=${this.item.units}`; fetch(url) .then((response) => { if (!response.ok) { -- cgit v1.2.3 From 9fce0ce5a5a2cce2d99c60cbd59def14156ebeef Mon Sep 17 00:00:00 2001 From: Robin Schneider <45321827+robinschneider@users.noreply.github.com> Date: Mon, 25 Oct 2021 14:08:31 +0200 Subject: Update src/components/services/OpenWeather.vue Co-authored-by: Bastien Wirtz --- src/components/services/OpenWeather.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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 { locationQuery = `q=${this.item.location}`; } - const url = `https://api.openweathermap.org/data/2.5/weather?${locationQuery}&appid=${this.item.apikey}&units=${this.item.units}`; + const apiKey = this.item.apikey || this.item.apiKey; + const url = `https://api.openweathermap.org/data/2.5/weather?${locationQuery}&appid=${apiKey}&units=${this.item.units}`; fetch(url) .then((response) => { if (!response.ok) { -- cgit v1.2.3