@brggroup/share-lib 0.1.1 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,7 +4,7 @@ import * as i1$4 from '@angular/router';
|
|
|
4
4
|
import { Router, ActivatedRoute, NavigationEnd, RouterLink, RouterOutlet } from '@angular/router';
|
|
5
5
|
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
6
6
|
import * as i3 from '@ngx-translate/core';
|
|
7
|
-
import { TranslateService,
|
|
7
|
+
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
8
8
|
import { firstValueFrom, fromEvent, startWith, map, BehaviorSubject, of, catchError, throwError, finalize, from, switchMap as switchMap$1, take, filter, Subject, takeUntil as takeUntil$1 } from 'rxjs';
|
|
9
9
|
import { NzNotificationService } from 'ng-zorro-antd/notification';
|
|
10
10
|
import * as i1 from 'ng-zorro-antd/modal';
|
|
@@ -803,7 +803,7 @@ function authInterceptor(req, next) {
|
|
|
803
803
|
const router = inject(Router);
|
|
804
804
|
const loadingService = inject(LoadingService);
|
|
805
805
|
const authService = inject(AuthService);
|
|
806
|
-
const translate = inject(
|
|
806
|
+
const translate = inject(TranslateService);
|
|
807
807
|
const authToken = TokenStorage.getToken();
|
|
808
808
|
const noLoadingMark = req.headers.get('No-Loading-Mark');
|
|
809
809
|
if (noLoadingMark !== '1')
|
|
@@ -849,8 +849,8 @@ function handle401(req, next, router, authService, translate) {
|
|
|
849
849
|
router.navigate(['/login'], {
|
|
850
850
|
queryParams: { returnUrl: initialReturnUrl || '/' },
|
|
851
851
|
});
|
|
852
|
-
refreshTokenSubject.error(translate.
|
|
853
|
-
return throwError(() => new Error(translate.
|
|
852
|
+
refreshTokenSubject.error(translate.instant('Refresh token failed'));
|
|
853
|
+
return throwError(() => new Error(translate.instant('Refresh token failed')));
|
|
854
854
|
}
|
|
855
855
|
// Phát token mới cho các request đang chờ
|
|
856
856
|
refreshTokenSubject.next(TokenStorage.getToken());
|