Skip to content

Commit

Permalink
Merge branch 'cbrelease-4.0.1' of https://github.com/sunbird-cb/sunbi…
Browse files Browse the repository at this point in the history
…rd-cb-portal into cbrelease-4.0.1
  • Loading branch information
christyfernandes committed Jul 5, 2022
2 parents b64d5c0 + e59ce2a commit 8aa909d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/services/app-interceptor.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { ConfigurationsService, AuthKeycloakService } from '@sunbird-cb/utils'
import { catchError } from 'rxjs/operators'
import { MatSnackBar } from '@angular/material/snack-bar'
import { NOTIFICATION_TIME } from '@sunbird-cb/collection/src/lib/_common/ck-editor/constants/constant'
import { Router } from '@angular/router'
// import 'rxjs/add/operator/do'

@Injectable({
Expand All @@ -15,6 +16,7 @@ export class AppInterceptorService implements HttpInterceptor {
private configSvc: ConfigurationsService,
private snackBar: MatSnackBar,
private authSvc: AuthKeycloakService,
private router: Router,
@Inject(LOCALE_ID) private locale: string,
) { }
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
Expand Down Expand Up @@ -89,7 +91,8 @@ export class AppInterceptorService implements HttpInterceptor {
// window.location.href = error.error.redirectUrl + `?q=${pageName} `
// }
if (!window.location.href.includes('/public/home')) {
window.location.href = '/public/home'
this.router.navigate(['public', 'home'])
// window.location.href = '/public/home'
}
// this.authSvc.force_logout()
break
Expand Down

0 comments on commit 8aa909d

Please sign in to comment.