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
|
|
|
|
2017-02-04 11:46:40 +09:00
|
|
|
// use global store
|
2017-01-31 17:54:56 +09:00
|
|
|
Mongo.Collection.prototype.findRedux = function (selector = {}, options = {}) {
|
2017-02-04 11:46:40 +09:00
|
|
|
return this.findInStore(store, selector, options);
|
2017-01-31 17:54:56 +09:00
|
|
|
}
|
|
|
|
|
2017-02-06 10:50:48 +09:00
|
|
|
Mongo.Collection.prototype.findOneRedux = function (_idOrObject) {
|
|
|
|
return this.findOneInStore(store, _idOrObject);
|
2017-02-06 14:33:34 +08:00
|
|
|
}
|