moleculerjs / moleculer-web

:earth_africa: Official API Gateway service for Moleculer framework
http://moleculer.services/docs/moleculer-web.html
MIT License
292 stars 118 forks source link

update request body value in onBeforeCall hook not working #351

Closed lling1105 closed 2 months ago

lling1105 commented 2 months ago

i need to modify request body value before it assign to individual service. i had modify body value in the onBeforeCall hook, but not working.

onBeforeCall(ctx, route, req, res){

                        ctx.params.req.body.sql = '...'
                    }
                }
lling1105 commented 2 months ago

ignore this question. i should use middleware.