style: format code with prettier
This commit is contained in:
parent
56fcb75599
commit
fe4116d4c2
1 changed files with 7 additions and 6 deletions
|
@ -3,15 +3,16 @@ import {
|
||||||
ApplicationConfig,
|
ApplicationConfig,
|
||||||
provideExperimentalZonelessChangeDetection,
|
provideExperimentalZonelessChangeDetection,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import {provideRouter} from '@angular/router';
|
import { provideRouter } from '@angular/router';
|
||||||
|
|
||||||
import {routes} from './app.routes';
|
import { routes } from './app.routes';
|
||||||
import {
|
import {
|
||||||
KeycloakAngularModule,
|
KeycloakAngularModule,
|
||||||
KeycloakBearerInterceptor, KeycloakEventType,
|
KeycloakBearerInterceptor,
|
||||||
|
KeycloakEventType,
|
||||||
KeycloakService,
|
KeycloakService,
|
||||||
} from 'keycloak-angular';
|
} from 'keycloak-angular';
|
||||||
import {HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
|
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
export const initializeKeycloak = (keycloak: KeycloakService) => async () => {
|
export const initializeKeycloak = (keycloak: KeycloakService) => async () => {
|
||||||
keycloak.keycloakEvents$.subscribe({
|
keycloak.keycloakEvents$.subscribe({
|
||||||
|
@ -19,7 +20,7 @@ export const initializeKeycloak = (keycloak: KeycloakService) => async () => {
|
||||||
if (e.type === KeycloakEventType.OnAuthSuccess) {
|
if (e.type === KeycloakEventType.OnAuthSuccess) {
|
||||||
alert('Login erfolreich');
|
alert('Login erfolreich');
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
return await keycloak.init({
|
return await keycloak.init({
|
||||||
|
@ -36,7 +37,7 @@ export const initializeKeycloak = (keycloak: KeycloakService) => async () => {
|
||||||
redirectUri: 'http://localhost:4200',
|
redirectUri: 'http://localhost:4200',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
function initializeApp(keycloak: KeycloakService): () => Promise<boolean> {
|
function initializeApp(keycloak: KeycloakService): () => Promise<boolean> {
|
||||||
return () => initializeKeycloak(keycloak)();
|
return () => initializeKeycloak(keycloak)();
|
||||||
|
|
Reference in a new issue