Vulcan/packages/vulcan-lib/lib/client/mongo_redux.js

13 lines
369 B
JavaScript
Raw Normal View History

2017-02-08 09:15:09 +08:00
import { getRenderContext } from './render_context.js';
2017-02-06 14:33:34 +08:00
2017-02-08 04:36:57 +08:00
const { store } = getRenderContext;
2017-01-31 17:54:56 +09:00
// use global store
2017-01-31 17:54:56 +09:00
Mongo.Collection.prototype.findRedux = function (selector = {}, options = {}) {
return this.findInStore(store, selector, options);
2017-01-31 17:54:56 +09:00
}
Mongo.Collection.prototype.findOneRedux = function (_idOrObject) {
return this.findOneInStore(store, _idOrObject);
2017-02-06 14:33:34 +08:00
}