mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
add missing typings to code (#1050)
* remove unused parameters * add missing types * add missing typing information * fix tests * restore old code
This commit is contained in:
+15
-13
@@ -77,22 +77,24 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.alfrescoApiService.getInstance().on('error', error => {
|
||||
if (error.status === 401) {
|
||||
if (!this.authenticationService.isLoggedIn()) {
|
||||
this.store.dispatch(new CloseModalDialogsAction());
|
||||
this.alfrescoApiService
|
||||
.getInstance()
|
||||
.on('error', (error: { status: number }) => {
|
||||
if (error.status === 401) {
|
||||
if (!this.authenticationService.isLoggedIn()) {
|
||||
this.store.dispatch(new CloseModalDialogsAction());
|
||||
|
||||
let redirectUrl = this.route.snapshot.queryParams['redirectUrl'];
|
||||
if (!redirectUrl) {
|
||||
redirectUrl = this.router.url;
|
||||
let redirectUrl = this.route.snapshot.queryParams['redirectUrl'];
|
||||
if (!redirectUrl) {
|
||||
redirectUrl = this.router.url;
|
||||
}
|
||||
|
||||
this.router.navigate(['/login'], {
|
||||
queryParams: { redirectUrl: redirectUrl }
|
||||
});
|
||||
}
|
||||
|
||||
this.router.navigate(['/login'], {
|
||||
queryParams: { redirectUrl: redirectUrl }
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
this.loadAppSettings();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user