bugfix edit travel
This commit is contained in:
@@ -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
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user