Takumon/mean-blog

View on GitHub
src/app/shared/services/http.interceptor.ts

Summary

Maintainability
A
1 hr
Test Coverage

Function intercept has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
    const token = this.localStorageService.get(LOCALSTORAGE_KEY.TOKEN);
    const req = request.clone(token
      ? { headers: request.headers.set('x-access-token', token)}
      : { headers: request.headers }
Severity: Minor
Found in src/app/shared/services/http.interceptor.ts - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status