diploma signature solved

This commit is contained in:
Eudes Inácio
2024-03-05 09:18:08 +01:00
parent 1fdc2e0b9c
commit 93f3c17d80
5 changed files with 164 additions and 6 deletions
+5 -3
View File
@@ -14,6 +14,7 @@ import { catchError, filter, take, switchMap, tap } from "rxjs/operators";
import { SessionStore } from '../store/session.service';
import { environment } from "src/environments/environment";
import { Router } from "@angular/router";
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
@Injectable()
export class TokenInterceptor implements HttpInterceptor {
@@ -24,7 +25,7 @@ export class TokenInterceptor implements HttpInterceptor {
private excludedDomains = ['Login', environment.apiChatUrl]; // Add the domains you want to exclude
constructor(private http: HttpClient, private router: Router,) { }
constructor(private http: HttpClient, private router: Router,private httpErrorHandle: HttpErrorHandle,) { }
intercept(
@@ -119,8 +120,9 @@ export class TokenInterceptor implements HttpInterceptor {
window.location.pathname = '/auth'
} else {
/* const pathBeforeGoOut = window.location.pathname */
this.router.navigateByUrl('/auth', { replaceUrl: true });
this.router.navigateByUrl('/auth', { replaceUrl: true }).then(() =>{
this.httpErrorHandle.httpsSucessMessagge('sessonExpired')
})
}
return of(false);
})