2018-07-31 11:11:20 +01:00
|
|
|
import { Observable } from 'rx';
|
2018-07-31 01:09:43 +05:30
|
|
|
|
|
|
|
module.exports = function(Popularity) {
|
2018-07-31 11:11:20 +01:00
|
|
|
Popularity.on('dataSourceAttached', () => {
|
|
|
|
Popularity.findOne$ = Observable.fromNodeCallback(
|
|
|
|
Popularity.findOne,
|
|
|
|
Popularity
|
|
|
|
);
|
|
|
|
Popularity.findById$ = Observable.fromNodeCallback(
|
|
|
|
Popularity.findById,
|
|
|
|
Popularity
|
|
|
|
);
|
|
|
|
Popularity.find$ = Observable.fromNodeCallback(Popularity.find, Popularity);
|
|
|
|
});
|
2018-07-31 01:09:43 +05:30
|
|
|
};
|