Vulcan/packages/nova-comments/lib/published_fields.js
2016-02-27 16:41:50 +09:00

27 lines
No EOL
667 B
JavaScript

import PublicationsUtils from 'meteor/utilities:smart-publications';
Comments.publishedFields = {};
/**
* Specify which fields should be published by the posts.list publication
* @array Posts.publishedFields.list
*/
Comments.publishedFields.list = PublicationsUtils.arrayToFields([
"_id",
"parentCommentId",
"topLevelCommentId",
"postedAt",
"body",
"htmlBody",
"author",
"inactive",
"postId",
"userId",
"isDeleted"
]);
/**
* Specify which fields should be published by the posts.single publication
* @array Posts.publishedFields.single
*/
Comments.publishedFields.single = PublicationsUtils.arrayToFields(Comments.getPublishedFields());