mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
28 lines
509 B
JavaScript
28 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");
|