|
@@ -1,5 +1,5 @@
|
|
|
Meteor.publish('posts', function (options) {
|
|
|
- // It would probably be safe to pass sort and limit as 2 separate params.
|
|
|
+ // It would probably be safer to pass sort and limit as 2 separate params.
|
|
|
check(options, {
|
|
|
sort: Object,
|
|
|
limit: Number
|
|
@@ -7,6 +7,11 @@ Meteor.publish('posts', function (options) {
|
|
|
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({
|