nestjs-custom-decorators 1.3.13
Install from the command line:
Learn more about npm packages
$ npm install @algoan/nestjs-custom-decorators@1.3.13
Install via package.json:
"@algoan/nestjs-custom-decorators": "1.3.13"
About this version
A set of nestjs custom decorators.
npm install --save @algoan/nestjs-custom-decoratos
A param decorator that fetches the request.user
(could be added by a middleware or a guard) and add it to the params.
@Get('/user')
public getUser(@User() user: any): void {
return user;
}
A param decorator that decodes the JSON web token added to the request by a middleware or a guard and add it to the params.
@Get('/decode-jwt')
public getDecodedJWT(@DecodeJWT() decodedJwt: any): void {
return decodedJwt;
}
Details
- nestjs-custom-decorators
- algoan
- about 1 year ago
- ISC
- 4 dependencies
Assets
- nestjs-custom-decorators-1.3.13.tgz
Download activity
- Total downloads 2,046
- Last 30 days 137
- Last week 30
- Today 0