Vulcan/packages/nova-comments/lib/published_fields.js

30 lines
768 B
JavaScript
Raw Normal View History

2016-06-23 12:17:39 +09:00
import Comments from './collection.js';
import PublicationsUtils from 'meteor/utilities:smart-publications';
// import Posts from "meteor/nova:posts";
2016-02-17 12:54:18 +09:00
Comments.publishedFields = {};
/**
* @summary Specify which fields should be published by the posts.list publication
2016-02-17 12:54:18 +09:00
* @array Posts.publishedFields.list
*/
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"
]);
/**
* @summary Specify which fields should be published by the posts.single publication
2016-02-17 12:54:18 +09:00
* @array Posts.publishedFields.single
*/
Comments.publishedFields.single = PublicationsUtils.arrayToFields(Comments.getPublishedFields());