X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2Fcomponents%2Fservices%2FOpenWeather.vue;h=79d5e37d67eb981e1420d487a9fe9c4cd1c480fd;hb=120ee25bf52e5a6809ce3919f625f269624ec32c;hp=7352b9be0ea4d540e8cb288948621eca4ee4da7b;hpb=f2c901a1ec45c91a3fb02333a61bb9d0c82e2859;p=github%2Fbastienwirtz%2Fhomer.git 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) {