mirror of
https://github.com/bec-project/bec_atlas.git
synced 2025-07-14 07:01:48 +02:00
fix(http interceptor): added http interceptor
This commit is contained in:
@ -52,8 +52,13 @@ class ScanRouter(BaseRouter):
|
|||||||
Args:
|
Args:
|
||||||
session_id (str): The session id
|
session_id (str): The session id
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if fields:
|
if fields:
|
||||||
fields = {field: 1 for field in fields}
|
fields = {
|
||||||
|
field: 1
|
||||||
|
for field in fields
|
||||||
|
if field in ScanStatusPartial.model_json_schema()["properties"].keys()
|
||||||
|
}
|
||||||
|
|
||||||
filters = {"session_id": session_id}
|
filters = {"session_id": session_id}
|
||||||
if filter:
|
if filter:
|
||||||
|
@ -9,9 +9,11 @@ import { routes } from './app.routes';
|
|||||||
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
|
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
|
||||||
import { AppConfigService } from './app-config.service';
|
import { AppConfigService } from './app-config.service';
|
||||||
import {
|
import {
|
||||||
|
HTTP_INTERCEPTORS,
|
||||||
provideHttpClient,
|
provideHttpClient,
|
||||||
withInterceptorsFromDi,
|
withInterceptorsFromDi,
|
||||||
} from '@angular/common/http';
|
} from '@angular/common/http';
|
||||||
|
import { AuthInterceptor } from './core/auth.interceptor';
|
||||||
|
|
||||||
const appConfigInitializerFn = (appConfig: AppConfigService) => {
|
const appConfigInitializerFn = (appConfig: AppConfigService) => {
|
||||||
return () => appConfig.loadAppConfig();
|
return () => appConfig.loadAppConfig();
|
||||||
@ -30,5 +32,10 @@ export const appConfig: ApplicationConfig = {
|
|||||||
deps: [AppConfigService],
|
deps: [AppConfigService],
|
||||||
multi: true,
|
multi: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
provide: HTTP_INTERCEPTORS,
|
||||||
|
useClass: AuthInterceptor,
|
||||||
|
multi: true,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user