401 errors will now not cause redirects in the /player route

This commit is contained in:
Isaac Abadi
2021-05-12 22:56:38 -06:00
parent 46f8579439
commit 1d2ab0dc41

View File

@@ -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.');
});