publish personal work

This commit is contained in:
Yaman Qalieh 2016-09-03 21:36:33 -04:00
parent b94003fcaf
commit 007ea30d42

View File

@ -85,12 +85,12 @@ Meteor.publish('work', function() {
return work.find({ return work.find({
// Only return work of enrolled classes // Only return work of enrolled classes
class: { class: {
$in: userprofile.profile.classes $in: userprofile.profile.classes.concat(Meteor.userId())
} }
}); });
} else { } else {
Meteor.call('createProfile', this.userId); Meteor.call('createProfile', this.userId);
return classes.find({ return work.find({
_id: null _id: null
}); });
} }