Files
old-tfm/app/server/publications.js
2016-10-08 16:02:59 +02:00

27 lines
551 B
JavaScript

// This code only runs on the server
Meteor.publish("sensor_data", function(controllerId) {
return SensorData.find({
controllerId: controllerId
}, {
sort: {
created_at: -1
},
limit: 100
});
});
// This code only runs on the server
Meteor.publish("controller_state", function(controllerId) {
return ControllerState.find({
controller_id: controllerId
});
});
// This code only runs on the server
Meteor.publish("pictures", function(controllerId) {
return Picture.find({
controller_id: controllerId
});
});