mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 20:46:40 -04:00
45 lines
841 B
JavaScript
45 lines
841 B
JavaScript
Telescope.settings.addField([
|
|
/**
|
|
How many upvotes the post has received
|
|
*/
|
|
{
|
|
fieldName: "upvotes",
|
|
fieldSchema: {
|
|
type: Number,
|
|
optional: true
|
|
}
|
|
},
|
|
/**
|
|
An array containing the `_id`s of the post's upvoters
|
|
*/
|
|
{
|
|
fieldName: "upvoters",
|
|
fieldSchema: {
|
|
type: [String],
|
|
optional: true
|
|
}
|
|
},
|
|
/**
|
|
How many downvotes the post has received
|
|
*/
|
|
{
|
|
fieldName: "downvotes",
|
|
fieldSchema: {
|
|
type: Number,
|
|
optional: true
|
|
}
|
|
},
|
|
/**
|
|
An array containing the `_id`s of the post's downvoters
|
|
*/
|
|
{
|
|
fieldName: "downvoters",
|
|
fieldSchema: {
|
|
type: [String],
|
|
optional: true
|
|
}
|
|
},
|
|
]);
|
|
|
|
Posts.publicationFields.list.push("upvotes", "downvotes");
|
|
Posts.publicationFields.single.push("upvotes", "upvoters", "downvotes", "downvoters");
|