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

31 lines
691 B
JavaScript
Raw Normal View History

import PublicationsUtils from 'meteor/utilities:smart-publications';
2016-02-17 12:54:18 +09:00
Posts.publishedFields = {};
2016-02-17 11:28:00 +09:00
/**
* Specify which fields should be published by the posts.list publication
2016-02-17 12:54:18 +09:00
* @array Posts.publishedFields.list
2016-02-17 11:28:00 +09:00
*/
Posts.publishedFields.list = PublicationsUtils.arrayToFields([
2016-02-17 11:28:00 +09:00
"_id",
"postedAt",
"url",
"title",
"slug",
"excerpt",
2016-02-17 11:28:00 +09:00
"viewCount",
"lastCommentedAt",
"clickCount",
"baseScore",
"score",
"status",
"sticky",
"author",
"userId"
2016-02-17 12:54:18 +09:00
]);
2016-02-17 11:28:00 +09:00
/**
* Specify which fields should be published by the posts.single publication
2016-02-17 12:54:18 +09:00
* @array Posts.publishedFields.single
2016-02-17 11:28:00 +09:00
*/
Posts.publishedFields.single = PublicationsUtils.arrayToFields(Posts.getPublishedFields());