mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-16 21:31:28 +03:00
401 errors will now not cause redirects in the /player route
This commit is contained in:
@@ -14,7 +14,7 @@ export class H401Interceptor implements HttpInterceptor {
|
|||||||
return next.handle(request).pipe(catchError(err => {
|
return next.handle(request).pipe(catchError(err => {
|
||||||
if (err.status === 401) {
|
if (err.status === 401) {
|
||||||
localStorage.setItem('jwt_token', null);
|
localStorage.setItem('jwt_token', null);
|
||||||
if (this.router.url !== '/login') {
|
if (this.router.url !== '/login' && !this.router.url.includes('player')) {
|
||||||
this.router.navigate(['/login']).then(() => {
|
this.router.navigate(['/login']).then(() => {
|
||||||
this.openSnackBar('Login expired, please login again.');
|
this.openSnackBar('Login expired, please login again.');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user