Merge pull request #19 from Derpthemeus/return-raw-data
Return raw data used to calculate watering level
This commit is contained in:
@@ -308,7 +308,8 @@ exports.getWateringData = function( req, res ) {
|
|||||||
tz: getTimezone( weather.timezone ),
|
tz: getTimezone( weather.timezone ),
|
||||||
sunrise: weather.sunrise,
|
sunrise: weather.sunrise,
|
||||||
sunset: weather.sunset,
|
sunset: weather.sunset,
|
||||||
eip: ipToInt( remoteAddress )
|
eip: ipToInt( remoteAddress ),
|
||||||
|
rawData: { h: weather.humidity, p: weather.precip, t: weather.temp }
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return the response to the client in the requested format
|
// Return the response to the client in the requested format
|
||||||
@@ -320,7 +321,8 @@ exports.getWateringData = function( req, res ) {
|
|||||||
"&tz=" + data.tz +
|
"&tz=" + data.tz +
|
||||||
"&sunrise=" + data.sunrise +
|
"&sunrise=" + data.sunrise +
|
||||||
"&sunset=" + data.sunset +
|
"&sunset=" + data.sunset +
|
||||||
"&eip=" + data.eip
|
"&eip=" + data.eip +
|
||||||
|
"&rawData=" + JSON.stringify( data.rawData )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user