From 457c80fe769e9bb785315c31b8ce6cb77bc5b867 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 31 May 2020 00:15:54 +0900 Subject: [PATCH] Correct #2018 Weather forecast need the maxNumberOfDays as argument &cnt=** The minimum is 1 and the maximum is 17. --- modules/default/weatherforecast/weatherforecast.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/default/weatherforecast/weatherforecast.js b/modules/default/weatherforecast/weatherforecast.js index 8846289e..a04fb40d 100644 --- a/modules/default/weatherforecast/weatherforecast.js +++ b/modules/default/weatherforecast/weatherforecast.js @@ -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;