Files
old-tfm/app/server/publications.js

31 lines
644 B
JavaScript
Raw Normal View History

2016-03-06 09:20:36 +01:00
// This code only runs on the server
Meteor.publish("sensor_data", function(controllerId) {
return SensorData.find({
controllerId: controllerId
}, {
sort: {
created_at: -1
2017-06-03 19:13:48 +02:00
},
limit: 100
2016-03-06 09:20:36 +01:00
});
});
// This code only runs on the server
Meteor.publish("controller_state", function(controllerId) {
return ControllerState.find({
controller_id: controllerId
});
});
2016-10-08 16:02:59 +02:00
2016-11-14 14:24:37 +01:00
Meteor.publish("all_controller_states", function() {
return ControllerState.find({});
});
2016-10-08 16:02:59 +02:00
// This code only runs on the server
Meteor.publish("pictures", function(controllerId) {
return Picture.find({
controller_id: controllerId
});
});