Vulcan/packages/telescope-search/lib/server/publications.js
2014-06-23 11:05:06 +09:00

7 lines
No EOL
221 B
JavaScript

Meteor.publish('searches', function(limit) {
var limit = typeof limit === undefined ? 20 : limit;
if(isAdminById(this.userId)){
return Searches.find({}, {limit: limit, sort: {timestamp: -1}});
}
return [];
});