mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
10 lines
280 B
JavaScript
10 lines
280 B
JavaScript
Meteor.publish('userSubscribedPosts', function(terms) {
|
|
|
|
if (this.userId) {
|
|
terms.currentUserId = this.userId; // add userId to terms
|
|
}
|
|
|
|
var parameters = Posts.parameters.get(terms);
|
|
var posts = Posts.find(parameters.selector, parameters.options);
|
|
return posts;
|
|
});
|