clean imports
This commit is contained in:
parent
9bb7619907
commit
efabd98719
@ -1,5 +1,5 @@
|
||||
import { HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpStatusCode } from '@angular/common/http';
|
||||
import { inject, Inject, Injectable, Optional } from '@angular/core';
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { MonoTypeOperatorFunction, Observable, retry, throwError, timer } from 'rxjs';
|
||||
import { catchError, tap } from 'rxjs/operators';
|
||||
import { MAX_RETRIES_ON_SERVER_ERROR, SERVER_ERROR_SKIP_PATHS } from './tokens';
|
||||
|
||||
@ -2,14 +2,11 @@ import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/c
|
||||
import { inject, Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { TenantContextHolder } from './tenant-context-holder';
|
||||
import { KeycloakService } from 'keycloak-angular';
|
||||
|
||||
@Injectable()
|
||||
export class TenantIdInterceptor implements HttpInterceptor {
|
||||
protected readonly _tenantContext = inject(TenantContextHolder);
|
||||
|
||||
protected readonly _keycloakService = inject(KeycloakService);
|
||||
|
||||
intercept(req: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> {
|
||||
if (this._tenantContext.currentTenant) {
|
||||
const updatedRequest = req.clone({
|
||||
|
||||
@ -7,11 +7,10 @@ import { TenantResolveComponent } from './tenant-resolve/tenant-resolve.componen
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { IqserConfigService } from '../services/iqser-config.service';
|
||||
import { IqserConfigService } from '../services';
|
||||
import { TenantContext, TenantIdInterceptor, TenantIdResponseInterceptor } from './services';
|
||||
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||
import { lastValueFrom } from 'rxjs';
|
||||
import { IqserLoadingModule } from '../loading';
|
||||
|
||||
const components = [TenantResolveComponent];
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user