2016-02-27 16:41:50 +09:00
|
|
|
import PublicationsUtils from 'meteor/utilities:smart-publications';
|
|
|
|
|
2016-02-17 12:54:18 +09:00
|
|
|
Comments.publishedFields = {};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Specify which fields should be published by the posts.list publication
|
|
|
|
* @array Posts.publishedFields.list
|
|
|
|
*/
|
2016-02-27 16:41:50 +09:00
|
|
|
Comments.publishedFields.list = PublicationsUtils.arrayToFields([
|
2016-02-17 12:54:18 +09:00
|
|
|
"_id",
|
|
|
|
"parentCommentId",
|
|
|
|
"topLevelCommentId",
|
|
|
|
"postedAt",
|
2016-02-18 21:39:33 +09:00
|
|
|
"body",
|
2016-02-17 12:54:18 +09:00
|
|
|
"htmlBody",
|
|
|
|
"author",
|
|
|
|
"inactive",
|
|
|
|
"postId",
|
|
|
|
"userId",
|
|
|
|
"isDeleted"
|
|
|
|
]);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Specify which fields should be published by the posts.single publication
|
|
|
|
* @array Posts.publishedFields.single
|
|
|
|
*/
|
2016-02-27 16:41:50 +09:00
|
|
|
Comments.publishedFields.single = PublicationsUtils.arrayToFields(Comments.getPublishedFields());
|