Vulcan/packages/vulcan-lib/lib/client/mongo_redux.js
2018-12-31 15:22:17 +09:00

12 lines
371 B
JavaScript

import { getRenderContext } from './render_context.js';
const { store } = getRenderContext;
// use global store
Mongo.Collection.prototype.findRedux = function (selector = {}, options = {}) {
return this.findInStore(store, selector, options);
};
Mongo.Collection.prototype.findOneRedux = function (_idOrObject) {
return this.findOneInStore(store, _idOrObject);
};