123456789101112131415161718192021222324252627 |
- Meteor.publish('posts', function (options) {
- // It would probably be safer to pass sort and limit as 2 separate params.
- check(options, {
- sort: Object,
- limit: Number
- });
- return Posts.find({}, options);
- });
- Meteor.publish('singlePost', function (postId) {
- check(postId, String);
- return Posts.find(postId);
- });
- 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
- });
- });
|