grapher/lib/exposure/extension.js

11 lines
301 B
JavaScript
Raw Normal View History

2016-09-14 16:04:08 +03:00
import Exposure from './exposure.js';
_.extend(Mongo.Collection.prototype, {
expose(config) {
if (!Meteor.isServer) {
throw new Meteor.Error('not-allowed', `You can only expose a collection server side. ${this._name}`);
}
new Exposure(this, config);
}
});