12345678910111213141516171819202122 |
- Meteor.publish('posts', function (options) {
- // It would probably be safe to pass sort and limit as 2 separate params.
- check(options, {
- sort: Object,
- limit: Number
- });
- 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
- });
- });
|