I need to modify the response data a module sends to the client, as the module uses res.send
i can't seem to figure out a way for me to modify the data before it's carried out to the client.
Is there any kind of middleware/event that I can use to catch the res.send
and modify the data before its executed?
I am aware that router.use
exists but it's called before the router.post
function and not before the res.send
is sent to the client. So I need some kind of middleware which is called after the router.post
function is done but before anything is sent to the client.