Skip to content
Permalink
Browse files

Step 7.11: Added users publication

  • Loading branch information...
dotansimha authored and DAB0mB committed Nov 3, 2016
1 parent 98386e9 commit 799cf388fe5b3ee6a569b7b1e744498f079199d3
Showing with 17 additions and 0 deletions.
  1. +17 −0 api/server/publications.ts
@@ -0,0 +1,17 @@
import { Meteor } from 'meteor/meteor';
import { Mongo } from 'meteor/mongo';
import { Users, Messages, Chats } from '../collections/whatsapp-collections';
import { User, Message, Chat } from 'api/models/whatsapp-models';

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

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

}

0 comments on commit 799cf38

Please sign in to comment.
You can’t perform that action at this time.