mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
diploma signature solved
This commit is contained in:
@@ -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);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user