mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-15 09:10:56 +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 => {
|
||||
if (err.status === 401) {
|
||||
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.openSnackBar('Login expired, please login again.');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user