mirror of
https://github.com/bastienwirtz/homer.git
synced 2024-11-07 16:54:00 +01:00
Merge pull request #316 from robinschneider/apikey
Fixes apikey inconsistency
This commit is contained in:
commit
b7480f632e
@ -43,7 +43,7 @@ The following configuration is available for the OpenWeatherMap service:
|
||||
- name: "Weather"
|
||||
location: "Amsterdam" # your location.
|
||||
locationId: "2759794" # Optional: Specify OpenWeatherMap city ID for better accuracy
|
||||
apiKey: "<---insert-api-key-here--->" # insert your own API key here. Request one from https://openweathermap.org/api.
|
||||
apikey: "<---insert-api-key-here--->" # insert your own API key here. Request one from https://openweathermap.org/api.
|
||||
units: "metric" # units to display temperature. Can be one of: metric, imperial, kelvin. Defaults to kelvin.
|
||||
background: "square" # choose which type of background you want behind the image. Can be one of: square, cicle, none. Defaults to none.
|
||||
type: "OpenWeather"
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user