Vulcan/packages/nova-comments/lib/published_fields.js
2016-06-23 12:17:39 +09:00

29 lines
No EOL
764 B
JavaScript

import Comments from './collection.js';
import PublicationsUtils from 'meteor/utilities:smart-publications';
import Posts from "meteor/nova:posts";
Comments.publishedFields = {};
/**
* @summary 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"
]);
/**
* @summary Specify which fields should be published by the posts.single publication
* @array Posts.publishedFields.single
*/
Comments.publishedFields.single = PublicationsUtils.arrayToFields(Comments.getPublishedFields());