Skip to content

Commit

Permalink
Step 9.11: Add users publication
Browse files Browse the repository at this point in the history
  • Loading branch information
DAB0mB committed Feb 26, 2017
1 parent 38f2e30 commit 87135f4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions server/publications.ts
@@ -0,0 +1,16 @@
import { Meteor } from 'meteor/meteor';
import { Mongo } from 'meteor/mongo';
import { Users } from '../imports/collections';
import { User } from '../imports/models';

Meteor.publish('users', function(): Mongo.Cursor<User> {
if (!this.userId) {
return;
}

return Users.collection.find({}, {
fields: {
profile: 1
}
});
});

0 comments on commit 87135f4

Please sign in to comment.