mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 04:26:41 -04:00
27 lines
509 B
JavaScript
27 lines
509 B
JavaScript
Posts.addField([
|
|
/**
|
|
Count of the post's comments
|
|
*/
|
|
{
|
|
fieldName: "commentCount",
|
|
fieldSchema: {
|
|
type: Number,
|
|
optional: true,
|
|
public: true
|
|
}
|
|
},
|
|
/**
|
|
An array containing the `_id`s of commenters
|
|
*/
|
|
{
|
|
fieldName: "commenters",
|
|
fieldSchema: {
|
|
type: [String],
|
|
optional: true,
|
|
public: true
|
|
}
|
|
}
|
|
]);
|
|
|
|
Posts.publicationFields.list.push("commentCount", "commenters");
|
|
Posts.publicationFields.single.push("commentCount", "commenters");
|