mirror of
https://github.com/vale981/grapher
synced 2025-03-06 01:51:38 -05:00
14 lines
354 B
JavaScript
14 lines
354 B
JavaScript
import Exposure from './exposure.js';
|
|
|
|
Object.assign(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);
|
|
},
|
|
});
|