Fix circular dep
This commit is contained in:
@@ -1,10 +1,7 @@
|
|||||||
import {HttpInterceptorFn} from '@angular/common/http';
|
import {HttpInterceptorFn} from '@angular/common/http';
|
||||||
import {inject} from '@angular/core';
|
|
||||||
import {AuthService} from '@services/auth.service';
|
|
||||||
|
|
||||||
export const authInterceptor: HttpInterceptorFn = (req, next) => {
|
export const authInterceptor: HttpInterceptorFn = (req, next) => {
|
||||||
const authService = inject(AuthService);
|
const jwt = localStorage.getItem('jwt')
|
||||||
const jwt = authService.getJwt();
|
|
||||||
|
|
||||||
if (jwt) {
|
if (jwt) {
|
||||||
const authReq = req.clone({
|
const authReq = req.clone({
|
||||||
|
|||||||
Reference in New Issue
Block a user