Nest: [Question] Additional decorators used with controller parameters

Created on 20 Nov 2017  路  5Comments  路  Source: nestjs/nest

Hello,

Is it possible to set custom properties into additional decorated parameters in controller ?
Example:

@Get()
async findAll(@Principal() principal:Principal) { }

Where principal will be built with factory based on current request context ?

I tried to use pipes, but without result. Looks interceptors/middlewares are not proper to go with it.

todo 馃挌

Most helpful comment

@szkumorowski I've created PR https://github.com/nestjs/nest/pull/240, waiting for @kamilmysliwiec approve.

All 5 comments

@szkumorowski I've created PR https://github.com/nestjs/nest/pull/240, waiting for @kamilmysliwiec approve.

Kudos to @zMotivat0r

I need this feature,too.
@kamilmysliwiec approve please.

Fantastic job @zMotivat0r. I'm gonna merge this pull request today 馃檪

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings