mirror of
https://github.com/Lissy93/dashy.git
synced 2025-12-06 08:34:14 +01:00
Fix apikey for Weather Forecast
Hopefully adding in the ability to read APIkey from env var
This commit is contained in:
parent
befa9a5c25
commit
bd505286e1
1 changed files with 2 additions and 1 deletions
|
|
@ -56,7 +56,8 @@ export default {
|
||||||
return this.options.numDays || 6;
|
return this.options.numDays || 6;
|
||||||
},
|
},
|
||||||
endpoint() {
|
endpoint() {
|
||||||
const { apiKey, city } = this.options;
|
const apiKey = this.parseAsEnvVar(this.options.apiKey);
|
||||||
|
const city = this.options;
|
||||||
const params = `?q=${city}&cnt=${this.numDays}&units=${this.units}&appid=${apiKey}`;
|
const params = `?q=${city}&cnt=${this.numDays}&units=${this.units}&appid=${apiKey}`;
|
||||||
return `${widgetApiEndpoints.weatherForecast}${params}`;
|
return `${widgetApiEndpoints.weatherForecast}${params}`;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue