alarm triggering / silencing works
This commit is contained in:
@@ -97,20 +97,6 @@ reactToSensorData = function(nextSensorReading) {
|
||||
}
|
||||
}
|
||||
|
||||
Api.addRoute('alarm/:id/stop', {
|
||||
authRequired: false
|
||||
}, {
|
||||
post: function() {
|
||||
var state = Meteor.zoblak.server.controller_state(controller_id);
|
||||
ControllerState.update(state._id, {
|
||||
'$set': {
|
||||
'state.alarmTriggered': false,
|
||||
'state.alarmStopped': new Date()
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Api.addRoute('state/:id', {
|
||||
authRequired: false
|
||||
}, {
|
||||
|
||||
Reference in New Issue
Block a user