mongoose-diff-history
mongoose-diff-history copied to clipboard
getHistories and getDiffs returned empty array
I have follow the docs and it was quite simple so I highly doubt its has to do with my code. I'm on the latest version of mongoose-diff-history (1.6.1) Here's what i have in my code:
router.get("/:company_id/histories",
function (req, res, next) {
Company.findById(req.params.company_id).exec(function (err, company) {
if (!company) {
return next(err)
}
diffHistory.getHistories('Company', req.params.company_id, ['description'], function (err, histories) {
if (err){ return next(err);}
res.json(histories);
})
})
});
@flippyang do you still have an issue? I think we would need more details to help you. Without more details this issue may be closed.