Skip to content

Commit 5f970eb

Browse files
dotansimhadarkbasic
authored andcommitted
Step 9.11: Add users publication
1 parent d9d674c commit 5f970eb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

api/server/publications.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { User } from './models';
2+
import { Users } from './collections/users';
3+
4+
Meteor.publish('users', function(): Mongo.Cursor<User> {
5+
if (!this.userId) {
6+
return;
7+
}
8+
9+
return Users.collection.find({}, {
10+
fields: {
11+
profile: 1
12+
}
13+
});
14+
});

0 commit comments

Comments
 (0)