Fixed filling logic
This commit is contained in:
@@ -5,26 +5,28 @@ if (Meteor.isServer) {
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
// Global API configuration
|
||||
var Api = new Restivus({
|
||||
useDefaultAuth: true,
|
||||
prettyJson: true
|
||||
});
|
||||
|
||||
Api.addRoute('sensorData', {
|
||||
authRequired: false
|
||||
}, {
|
||||
post: function() {
|
||||
SensorData.insert({
|
||||
temperatureValue: parseFloat(this.bodyParams.temperatureValue),
|
||||
humidityValue: parseFloat(this.bodyParams.humidityValue),
|
||||
tankFull: this.bodyParams.tankFull,
|
||||
owner: this.bodyParams.owner,
|
||||
created_at: new Date()
|
||||
});
|
||||
return [];
|
||||
}
|
||||
});
|
||||
// Api.addRoute('sensorData', {
|
||||
// authRequired: false
|
||||
// }, {
|
||||
// post: function() {
|
||||
// SensorData.insert({
|
||||
// temperatureValue: parseFloat(this.bodyParams.temperatureValue),
|
||||
// humidityValue: parseFloat(this.bodyParams.humidityValue),
|
||||
// tankFull: this.bodyParams.tankFull,
|
||||
// owner: this.bodyParams.owner,
|
||||
// created_at: new Date()
|
||||
// });
|
||||
// return [];
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user