Append slash to endpoint. (Fix issue #337)

This commit is contained in:
Michael Teeuw 2016-07-20 18:51:34 +02:00
parent c81db752f6
commit ae37fa2bc5
3 changed files with 7 additions and 6 deletions

View File

@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Fixed ### Fixed
- Prevent `getModules()` selectors from returning duplicate entries. - Prevent `getModules()` selectors from returning duplicate entries.
- Append endpoints of weather modules with `/` to retreive the correct data. (Issue [#337](https://github.com/MichMich/MagicMirror/issues/337))
## [2.0.3] - 2016-07-12 ## [2.0.3] - 2016-07-12
### Added ### Added
@ -15,8 +16,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Add an analog clock in addition to the digital one. - Add an analog clock in addition to the digital one.
### Fixed ### Fixed
- Edit Alert Module to display title & message if they are provided in the notification (Issue #300) - Edit Alert Module to display title & message if they are provided in the notification (Issue [#300](https://github.com/MichMich/MagicMirror/issues/300))
- Removed 'null' reference from updateModuleContent(). This fixes recent Edge and Internet Explorer browser displays (Issue #319) - Removed 'null' reference from updateModuleContent(). This fixes recent Edge and Internet Explorer browser displays (Issue [#319](https://github.com/MichMich/MagicMirror/issues/319))
### Changed ### Changed
- Added default string to calendar titleReplace. - Added default string to calendar titleReplace.

View File

@ -164,7 +164,7 @@ Module.register("currentweather",{
* Calls processWeather on succesfull response. * Calls processWeather on succesfull response.
*/ */
updateWeather: function() { updateWeather: function() {
var url = this.config.apiBase + this.config.apiVersion + "/" + this.config.weatherEndpoint + this.getParams(); var url = this.config.apiBase + this.config.apiVersion + "/" + this.config.weatherEndpoint + '/' + this.getParams();
var self = this; var self = this;
var retry = true; var retry = true;
@ -201,7 +201,7 @@ Module.register("currentweather",{
var params = "?"; var params = "?";
if(this.config.locationID !== "") { if(this.config.locationID !== "") {
params += "id=" + this.config.locationID; params += "id=" + this.config.locationID;
} else { } else {
params += "q=" + this.config.location; params += "q=" + this.config.location;
} }
params += "&units=" + this.config.units; params += "&units=" + this.config.units;

View File

@ -161,7 +161,7 @@ Module.register("weatherforecast",{
* Calls processWeather on succesfull response. * Calls processWeather on succesfull response.
*/ */
updateWeather: function() { updateWeather: function() {
var url = this.config.apiBase + this.config.apiVersion + "/" + this.config.forecastEndpoint + this.getParams(); var url = this.config.apiBase + this.config.apiVersion + "/" + this.config.forecastEndpoint + '/' + this.getParams();
var self = this; var self = this;
var retry = true; var retry = true;
@ -198,7 +198,7 @@ Module.register("weatherforecast",{
var params = "?"; var params = "?";
if(this.config.locationID !== "") { if(this.config.locationID !== "") {
params += "id=" + this.config.locationID; params += "id=" + this.config.locationID;
} else { } else {
params += "q=" + this.config.location; params += "q=" + this.config.location;
} }
params += "&units=" + this.config.units; params += "&units=" + this.config.units;