Skip to content

Commit

Permalink
Step 12.11: Add usage of Counts
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Kisiela authored and DAB0mB committed Dec 14, 2016
1 parent 4eef589 commit 6c28bc9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions imports/api/parties/publish.js
@@ -1,4 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { Counts } from 'meteor/tmeasday:publish-counts';

import { Parties } from './collection';

Expand Down Expand Up @@ -26,6 +27,10 @@ if (Meteor.isServer) {
}]
};

Counts.publish(this, 'numberOfParties', Parties.find(selector), {
noReady: true
});

return Parties.find(selector, options);
});
}

0 comments on commit 6c28bc9

Please sign in to comment.