fixed api problems
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// Global API configuration
|
||||
var Api = new Restivus({
|
||||
version: 'v1.0',
|
||||
useDefaultAuth: true,
|
||||
prettyJson: true
|
||||
});
|
||||
@@ -8,6 +9,7 @@ Api.addRoute('sensorData', {
|
||||
authRequired: false
|
||||
}, {
|
||||
post: function() {
|
||||
console.log("Body params", this.bodyParams);
|
||||
SensorData.insert({
|
||||
temperatureValue: parseFloat(this.bodyParams.temperatureValue),
|
||||
humidityValue: parseFloat(this.bodyParams.humidityValue),
|
||||
|
||||
Reference in New Issue
Block a user