diff --git a/modules/default/weather/providers/envcanada.js b/modules/default/weather/providers/envcanada.js index ea2d5980..868ee6e2 100644 --- a/modules/default/weather/providers/envcanada.js +++ b/modules/default/weather/providers/envcanada.js @@ -164,9 +164,7 @@ WeatherProvider.register("envcanada", { // CORS errors when accessing EC // getUrl() { - const path = "https://thingproxy.freeboard.io/fetch/https://dd.weather.gc.ca/citypage_weather/xml/" + this.config.provCode + "/" + this.config.siteCode + "_e.xml"; - - return path; + return "https://thingproxy.freeboard.io/fetch/https://dd.weather.gc.ca/citypage_weather/xml/" + this.config.provCode + "/" + this.config.siteCode + "_e.xml"; }, // diff --git a/modules/default/weather/providers/ukmetofficedatahub.js b/modules/default/weather/providers/ukmetofficedatahub.js index 21245a4c..9603841b 100644 --- a/modules/default/weather/providers/ukmetofficedatahub.js +++ b/modules/default/weather/providers/ukmetofficedatahub.js @@ -71,13 +71,11 @@ WeatherProvider.register("ukmetofficedatahub", { // For DataHub requests, the API key/secret are sent in the headers rather than as query strings. // Headers defined according to Data Hub API (https://metoffice.apiconnect.ibmcloud.com/metoffice/production/api) getHeaders() { - let headers = { + return { accept: "application/json", "x-ibm-client-id": this.config.apiKey, "x-ibm-client-secret": this.config.apiSecret }; - - return headers; }, // Fetch data using supplied URL and request headers diff --git a/modules/default/weather/weatherobject.js b/modules/default/weather/weatherobject.js index 56eeeeee..9224208a 100755 --- a/modules/default/weather/weatherobject.js +++ b/modules/default/weather/weatherobject.js @@ -90,8 +90,7 @@ class WeatherObject { } kmhWindSpeed() { - const windInKmh = this.windUnits === "imperial" ? this.windSpeed * 1.609344 : (this.windSpeed * 60 * 60) / 1000; - return windInKmh; + return this.windUnits === "imperial" ? this.windSpeed * 1.609344 : (this.windSpeed * 60 * 60) / 1000; } nextSunAction() {