publications.js 345 B

1234567891011121314151617181920212223
  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. });
  18. Meteor.publish('notifications', function () {
  19. return Notifications.find();
  20. });