Vulcan/packages/nova-lib/lib/client/mongo_redux.js
2017-02-08 04:36:57 +08:00

12 lines
361 B
JavaScript

import { getRenderContext } from './render.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);
}