Files
freeCodeCamp/api-server/common/models/article.js
Mrugesh Mohapatra 8f0e441644 revert(api): decouple api from curriculum
This reverts commit c077ffe4b9
via PR #40703
2021-02-25 03:40:09 +05:30

10 lines
353 B
JavaScript

import { Observable } from 'rx';
module.exports = function(Article) {
Article.on('dataSourceAttached', () => {
Article.findOne$ = Observable.fromNodeCallback(Article.findOne, Article);
Article.findById$ = Observable.fromNodeCallback(Article.findById, Article);
Article.find$ = Observable.fromNodeCallback(Article.find, Article);
});
};