Skip to content
Snippets Groups Projects
Commit 0cee4c19 authored by Kawtar Laariche's avatar Kawtar Laariche
Browse files

remove production condition

parent a6852e38
No related branches found
No related tags found
No related merge requests found
import { inject } from '@angular/core'; import { inject } from '@angular/core';
import { HttpHandlerFn, HttpInterceptorFn, HttpRequest } from '@angular/common/http'; import {
HttpHandlerFn,
HttpInterceptorFn,
HttpRequest,
} from '@angular/common/http';
import { switchMap } from 'rxjs/operators'; import { switchMap } from 'rxjs/operators';
import { environment } from 'src/environments/environment'; import { environment } from 'src/environments/environment';
import { JwtTokenService } from '../services/auth/jwt-token.service'; import { JwtTokenService } from '../services/auth/jwt-token.service';
...@@ -10,10 +14,6 @@ export const devAuthInterceptor: HttpInterceptorFn = ( ...@@ -10,10 +14,6 @@ export const devAuthInterceptor: HttpInterceptorFn = (
) => { ) => {
const jwtTokenService = inject(JwtTokenService); const jwtTokenService = inject(JwtTokenService);
if (environment.production) {
return next(request);
}
return jwtTokenService.getToken().pipe( return jwtTokenService.getToken().pipe(
switchMap((token) => { switchMap((token) => {
if (token) { if (token) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment