Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getHistories and getDiffs returned empty array #42

Open
flippyang opened this issue May 21, 2019 · 1 comment
Open

getHistories and getDiffs returned empty array #42

flippyang opened this issue May 21, 2019 · 1 comment

Comments

@flippyang
Copy link

flippyang commented May 21, 2019

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);
	        })
	    })
});
@zjr
Copy link
Collaborator

zjr commented Apr 24, 2020

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants