publications.js 263 B

12345678910111213141516171819
  1. /**
  2. * @file
  3. *
  4. *
  5. * User: marand
  6. * Date: 30/08/15
  7. * Time: 11:53
  8. */
  9. Meteor.publish('posts', function() {
  10. return Posts.find();
  11. });
  12. Meteor.publish('comments', function(postId) {
  13. check(postId, String);
  14. return Comments.find({
  15. postId: postId
  16. });
  17. });