X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2Fcomponents%2Fservices%2FOpenWeather.vue;h=79d5e37d67eb981e1420d487a9fe9c4cd1c480fd;hb=5fdf790e2cbfc11acff8e4d93d55433d28dd678f;hp=09ff76a3d07e04ec9c015fba6d727b5b3042af9a;hpb=4eeed6596bc79d340d8b3e4dd7d0efa5aa358efc;p=github%2Fbastienwirtz%2Fhomer.git 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 { 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) {