Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Weather forecast need the maxNumberOfDays as argument &cnt=**
The minimum is 1 and the maximum is 17.
  • Loading branch information
Ekristoffe authored May 30, 2020
1 parent 8a3a4d6 commit 457c80f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/default/weatherforecast/weatherforecast.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ Module.register("weatherforecast", {
return;
}

params += "&cnt=" + (((this.config.maxNumberOfDays < 1) || (this.config.maxNumberOfDays > 17)) ? 7 : this.config.maxNumberOfDays);

params += "&units=" + this.config.units;
params += "&lang=" + this.config.lang;
params += "&APPID=" + this.config.appid;
Expand Down

0 comments on commit 457c80f

Please sign in to comment.