Meteor.publish('posts', function(options) {
  return Posts.find({}, options);
});

Meteor.publish('comments', function(postId) {
  check(postId, String);
  return Comments.find({ postId: postId });
});

Meteor.publish('notifications', function() {
  return Notifications.find({ userId: this.userId, read: false });
});

Meteor.publish('posts', function(options) {
  return Posts.find({}, options);
});

Meteor.publish('comments', function(postId) {
  check(postId, String);
  return Comments.find({ postId: postId });
});

Meteor.publish('notifications', function() {
  return Notifications.find({ userId: this.userId, read: false });
});

Meteor.publish('singlePost', function(id) {
  check(id, String)
  return Posts.find(id);
});

Add publication for a single post
Add publication for a single post
