Correct apibase of weathergov weatherprovider to match documentation (#2927)

Fixes part of #2926
This commit is contained in:
Veeck
2024-01-27 22:31:50 +01:00
committed by GitHub
parent fb5fab8145
commit 3bf848075d
2 changed files with 2 additions and 2 deletions

View File

@@ -34,7 +34,6 @@ WeatherProvider.register("weathergov", {
// Called to set the config, this config is the same as the weather module's config.
setConfig (config) {
this.config = config;
this.config.apiBase = "https://api.weather.gov";
this.fetchWxGovURLs(this.config);
},
@@ -118,7 +117,7 @@ WeatherProvider.register("weathergov", {
* Get specific URLs
*/
fetchWxGovURLs (config) {
this.fetchData(`${config.apiBase}/points/${config.lat},${config.lon}`)
this.fetchData(`${config.apiBase}/${config.lat},${config.lon}`)
.then((data) => {
if (!data || !data.properties) {
// points URL did not respond with usable data.