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:
Denys Vuika
2019-04-02 14:38:29 +01:00
committed by GitHub
parent 04cdc1dadd
commit 3a4cff505f
46 changed files with 347 additions and 400 deletions
+15 -13
View File
@@ -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();