2016-02-27 16:41:50 +09:00
|
|
|
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
|
|
|
*/
|
2016-02-27 16:41:50 +09:00
|
|
|
Posts.publishedFields.list = PublicationsUtils.arrayToFields([
|
2016-02-17 11:28:00 +09:00
|
|
|
"_id",
|
|
|
|
"postedAt",
|
|
|
|
"url",
|
|
|
|
"title",
|
|
|
|
"slug",
|
2016-03-28 10:31:28 +09:00
|
|
|
"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
|
|
|
*/
|
2016-02-27 16:41:50 +09:00
|
|
|
Posts.publishedFields.single = PublicationsUtils.arrayToFields(Posts.getPublishedFields());
|