bugfix edit travel

This commit is contained in:
2021-03-19 22:56:55 +01:00
parent e02860aa56
commit d8e5ddc253
3 changed files with 5 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { APP_INITIALIZER, NgModule } from '@angular/core';
import { AuthInterceptor, AuthModule, OidcConfigService } from 'angular-auth-oidc-client';
import { AuthInterceptor, AuthModule, LogLevel, OidcConfigService } from 'angular-auth-oidc-client';
import { TRAVEL_API_URL, USER_API_URL } from '../app.config';
export function configureAuth(oidcConfigService: OidcConfigService): () => Promise<any> {
@@ -19,7 +19,8 @@ export function configureAuth(oidcConfigService: OidcConfigService): () => Promi
tokenRefreshInSeconds: 20,
ignoreNonceAfterRefresh: true, // El refresh token está fallando si no se ignora el Nonce
secureRoutes: [TRAVEL_API_URL, USER_API_URL],
logLevel: 1
storage: localStorage,
logLevel: LogLevel.Warn
});
}

View File

@@ -22,7 +22,7 @@ export class EditTravelComponent implements OnInit {
) { }
ngOnInit(): void {
this.route.queryParams.subscribe(params => {
this.route.paramMap.subscribe(params => {
const travelId = params.get('id') as unknown as TravelId;
this.apiService.getTravel(travelId)

View File

@@ -22,7 +22,7 @@ export class TravelComponent implements OnInit {
) { }
ngOnInit(): void {
this.route.queryParams.subscribe(params => {
this.route.paramMap.subscribe(params => {
this.travelId = this.route.snapshot.paramMap.get('id') as unknown as TravelId;
this.loadTravel();