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:
|
||||
session_id (str): The session id
|
||||
"""
|
||||
|
||||
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}
|
||||
if filter:
|
||||
|
@ -9,9 +9,11 @@ import { routes } from './app.routes';
|
||||
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
|
||||
import { AppConfigService } from './app-config.service';
|
||||
import {
|
||||
HTTP_INTERCEPTORS,
|
||||
provideHttpClient,
|
||||
withInterceptorsFromDi,
|
||||
} from '@angular/common/http';
|
||||
import { AuthInterceptor } from './core/auth.interceptor';
|
||||
|
||||
const appConfigInitializerFn = (appConfig: AppConfigService) => {
|
||||
return () => appConfig.loadAppConfig();
|
||||
@ -30,5 +32,10 @@ export const appConfig: ApplicationConfig = {
|
||||
deps: [AppConfigService],
|
||||
multi: true,
|
||||
},
|
||||
{
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: AuthInterceptor,
|
||||
multi: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
Reference in New Issue
Block a user