Blame view
imports/collections/students/publications.js
597 Bytes
c6b4fc634
|
1 2 3 4 5 6 7 8 9 10 |
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'; import { Students } from '/imports/collections/students/index'; Meteor.publish('student.forMyOrg', function () { const user = Users.findOne({_id: this.userId}); if(!user) return []; |
bdd4abb61
|
11 |
return Students.find({orgId: user.orgId,"admissionId" : {"$exists" : true, "$ne" : ""}}); |
c6b4fc634
|
12 |
}); |