@mest-fe/request-id
Advanced tools
Comparing version 0.1.0 to 0.1.1-dev.0
@@ -23,2 +23,5 @@ "use strict"; | ||
intercept(context, next) { | ||
const contextType = context.getType(); | ||
if (contextType === 'stripe_webhook') | ||
return next.handle(); | ||
return next.handle().pipe((0, rxjs_1.tap)(() => { | ||
@@ -25,0 +28,0 @@ const req = context.switchToHttp().getRequest(); |
@@ -15,2 +15,5 @@ "use strict"; | ||
intercept(context, next) { | ||
const contextType = context.getType(); | ||
if (contextType === 'stripe_webhook') | ||
return next.handle(); | ||
const request = context.switchToHttp().getRequest(); | ||
@@ -17,0 +20,0 @@ if (request.get(request_id_helper_1.DEFAULT_REQUEST_ID_KEY)) |
{ | ||
"name": "@mest-fe/request-id", | ||
"version": "0.1.0", | ||
"version": "0.1.1-dev.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "@mest-fe", |
## Request ID for Mest APIs | ||
This repository integrates Mest internal environment variables and is not suitable for all nestjs projects. | ||
`request-id` will create a unique id for each request as it comes in and write it to the header at the end of the request. | ||
### Usage | ||
1. Install: `pnpm add @mest-fe/request-id` | ||
2. Import and use it in your project: | ||
```ts | ||
import { RequestIdModule } from '@mest-fe/request-id' | ||
@Module({ | ||
imports: [RequestIdModule], | ||
}) | ||
export class AppModule {} | ||
``` | ||
### LICENSE | ||
[MIT](LICENSE) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
146443
22
159
24