mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
19 lines
582 B
JavaScript
19 lines
582 B
JavaScript
// import Users from 'meteor/vulcan:users';
|
|
//
|
|
// if (typeof Package['vulcan:posts'] !== "undefined") {
|
|
// import Posts from "meteor/vulcan:posts";
|
|
//
|
|
// Posts.views.add("userSubscribedPosts", function (terms) {
|
|
// var user = Users.findOne(terms.userId),
|
|
// postsIds = [];
|
|
//
|
|
// if (user && user.subscribedItems && user.subscribedItems.Posts) {
|
|
// postsIds = _.pluck(user.subscribedItems.Posts, "itemId");
|
|
// }
|
|
//
|
|
// return {
|
|
// selector: {_id: {$in: postsIds}},
|
|
// options: {limit: 5, sort: {postedAt: -1}}
|
|
// };
|
|
// });
|
|
// }
|