Blame view
imports/collections/orgs/publications.js
556 Bytes
ff976df49
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import { Meteor } from 'meteor/meteor'; import { check, Match } from 'meteor/check' import { Orgs } from '/imports/collections/orgs/index'; import { Users } from '/imports/collections/users/index'; Meteor.publish('orgs.current', function () { const user = Users.findOne({_id: this.userId}); if(!user) return []; return Orgs.find({_id: user.orgId}); }); Meteor.publish('allOrgsSlug', function () { |
ff976df49
|
15 16 |
return Orgs.find({},{fields: Orgs.publicFields}); }); |