use this middleware at first of code
// fix edit request query and make it allow for edit this in new version of express
app.use((req, res, next) => {
Object.defineProperty(req, 'query', {
...Object.getOwnPropertyDescriptor(req, 'query'),
value: req.query,
writable: true,
});
next();
});