Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.auth.validateToken().subscribe(res => {
this.validateLoading = res.error
? ClrLoadingState.ERROR
: ClrLoadingState.SUCCESS;
});
}
private handleLoginError(err: ApolloError) {
this.loginBtnState = ClrLoadingState.ERROR;
this.core.handleFormValidationErrors(this.loginForm, err);
}
this.auth.signIn(this.username, this.password).subscribe(res => {
this.signInLoading = res.error
? ClrLoadingState.ERROR
: ClrLoadingState.SUCCESS;
});
}
}, error => {
this.scanBtnState = ClrLoadingState.ERROR;
});
}
}, error => {
this.inlineAlert.showInlineError(error);
this.saveBtnState = ClrLoadingState.ERROR;
});
}
}, error => {
this.inlineAlert.showInlineError(error);
this.saveBtnState = ClrLoadingState.ERROR;
});
}