express-crud-router
express-crud-router copied to clipboard
Option to let express-sequelize-crud act as middleware?
First of all thanks for a lot for express-sequelize-crud <3
And I am wondering if it's possible to let express-sequelize-crud act as middleware?
So instead of:
async (req, res, next) => {
...
res.json(rows);
}
I would like it to do something like this:
async (req, res, next) => {
...
res.bodyInterface.setData(rows);
next();
}
So I can do other stuff like logging after express-sequelize-crud did his thing.
Sorry for the delay to answer... we are not used to maintain open source packages and definitely have an improvement area in how we answer to our users.
I am not aware of how to correctly deal with the use case you describe. I can't find any information about res.bodyInterface. Could you point to some documentation explaining how to deal with this?
Thanks
@nicgirault Thanks for the reply, res.bodyInterface is just a tiny interface I added myself in a middleware function.
As there is no activity on this pull request and I am not sure how to handle this correctly, I am closing this issue for now.