We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c52f0c7 + c155844 commit 9618920Copy full SHA for 9618920
src/interceptor/user.interceptor.ts
@@ -8,6 +8,8 @@ import { Observable } from 'rxjs';
8
import { tap, finalize } from 'rxjs/operators';
9
import { trace, context } from '@opentelemetry/api';
10
11
+const LOGIN_URLS = ['/api/v1/login', '/api/v1/sign-up/confirm'];
12
+
13
@Injectable()
14
export class UserInterceptor implements NestInterceptor {
15
intercept(
@@ -27,7 +29,7 @@ export class UserInterceptor implements NestInterceptor {
27
29
if (req.user?.id) {
28
30
span.setAttribute('user.id', req.user.id);
31
} else if (
- req.url === '/api/v1/login' &&
32
+ LOGIN_URLS.includes(req.url) &&
33
req.method === 'POST' &&
34
responseBody?.id
35
) {
0 commit comments