controller id is now sent with sensor data
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
Template.log.helpers({
|
||||
sensorDataCollection: function() {
|
||||
return SensorData.find({}, {
|
||||
var controllerId = Session.get('controller_id');
|
||||
return SensorData.find({ controllerId: controllerId }, {
|
||||
sort: {
|
||||
created_at: -1
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ Api.addRoute('sensorData', {
|
||||
humidityValue: parseFloat(this.bodyParams.humidityValue),
|
||||
tankFull: this.bodyParams.tankFull,
|
||||
owner: this.bodyParams.owner,
|
||||
controllerId: this.bodyParams.controllerId,
|
||||
created_at: new Date()
|
||||
});
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user