mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 04:16:37 -04:00
16 lines
452 B
JavaScript
16 lines
452 B
JavaScript
Meteor.publish('settings', function() {
|
|
var options = {};
|
|
var privateFields = {};
|
|
|
|
// look at Settings.simpleSchema._schema to see which fields should be kept private
|
|
_.each(Telescope.settings.collection.simpleSchema()._schema, (property, key) => {
|
|
if (property.private)
|
|
privateFields[key] = false;
|
|
});
|
|
|
|
options = _.extend(options, {
|
|
fields: privateFields
|
|
});
|
|
|
|
return Telescope.settings.collection.find({}, options);
|
|
});
|