moleculerjs / moleculer-web

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

Add alias as last parameter #290

Closed icebob closed 2 years ago

icebob commented 2 years ago

Add alias to the following hooks as last parameter:

You can access it in the hook handlers, e.g.:

{
    path: "/",

    onBeforeCall(ctx, route, req, res, alias) {
        ctx.meta.aliasPath = alias.path;
    }
}