Skip to content

Commit bf676be

Browse files
refactor(pirateweather): change default units from 'us' to 'si' in getUrl method
Aligns with existing pattern in openweathermap, weatherapi providers.
1 parent 3ab5f8a commit bf676be

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

defaultmodules/weather/providers/pirateweather.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ class PirateweatherProvider {
1111
lon: 0,
1212
type: "current",
1313
updateInterval: 10 * 60 * 1000,
14-
units: "us",
1514
lang: "en",
1615
...config
1716
};
@@ -234,9 +233,8 @@ class PirateweatherProvider {
234233
#getUrl () {
235234
const apiBase = this.config.apiBase || "https://api.pirateweather.net";
236235
const weatherEndpoint = this.config.weatherEndpoint || "/forecast";
237-
const units = this.config.units || "us";
238236
const lang = this.config.lang || "en";
239-
return `${apiBase}${weatherEndpoint}/${this.config.apiKey}/${this.config.lat},${this.config.lon}?units=${units}&lang=${lang}`;
237+
return `${apiBase}${weatherEndpoint}/${this.config.apiKey}/${this.config.lat},${this.config.lon}?units=si&lang=${lang}`;
240238
}
241239

242240
#convertWeatherType (weatherType) {

0 commit comments

Comments
 (0)