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
dotansimha authored and darkbasic committed Oct 16, 2017
1 parent d9d674c commit 5f970eb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions api/server/publications.ts
@@ -0,0 +1,14 @@
import { User } from './models';
import { Users } from './collections/users';

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

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

0 comments on commit 5f970eb

Please sign in to comment.