mirror of
https://github.com/bastienwirtz/homer.git
synced 2024-11-07 16:54:00 +01:00
Update src/components/services/OpenWeather.vue
Co-authored-by: Bastien Wirtz <bastien.wirtz@gmail.com>
This commit is contained in:
parent
f2c901a1ec
commit
9fce0ce5a5
@ -64,7 +64,8 @@ export default {
|
|||||||
locationQuery = `q=${this.item.location}`;
|
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)
|
fetch(url)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
|
Loading…
Reference in New Issue
Block a user