In my validation package celebrate, I run joi against the parsed query string. If there are any transformations applied (default value, convert "1" to 1, etc.) I want to set that result back to req.query so any downstream functions are working with the validated and updated query object.
In versions 3 and 4 of express, it's as simple as req.query = UPDATED_QUERY. In version 5, because of this change it's not as simple anymore.
What is the recommended way for doing this in version 5?
In my validation package celebrate, I run joi against the parsed query string. If there are any transformations applied (default value, convert
"1"to1, etc.) I want to set that result back toreq.queryso any downstream functions are working with the validated and updated query object.In versions 3 and 4 of express, it's as simple as
req.query = UPDATED_QUERY. In version 5, because of this change it's not as simple anymore.What is the recommended way for doing this in version 5?