Commit ebd028f3 authored by dev0tion's avatar dev0tion

Use login component instead of wallet status

parent 1712da38
...@@ -15,25 +15,26 @@ export class AppComponent implements OnInit { ...@@ -15,25 +15,26 @@ export class AppComponent implements OnInit {
private responseMessage: any; private responseMessage: any;
ngOnInit() { ngOnInit() {
this.checkWalletStatus();
}
private checkWalletStatus(){
this.apiService.getWalletStatus()
.subscribe(
response => {
if (response.status >= 200 && response.status < 400) {
this.responseMessage = response;
this.router.navigate(['/login']); this.router.navigate(['/login']);
//this.checkWalletStatus();
} }
},
error => { // private checkWalletStatus(){
this.errorMessage = <any>error; // this.apiService.getWalletStatus()
if (error.status === 400 || error.status === 404) { // .subscribe(
this.router.navigate(['/setup']); // response => {
console.log(this.errorMessage); // if (response.status >= 200 && response.status < 400) {
} // this.responseMessage = response;
} // this.router.navigate(['/login']);
); // }
} // },
// error => {
// this.errorMessage = <any>error;
// if (error.status === 400 || error.status === 404) {
// this.router.navigate(['/setup']);
// console.log(this.errorMessage);
// }
// }
// );
// }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment