Errormessage added + type and required added
This commit is contained in:
parent
0034b66391
commit
4b8337c4f6
1 changed files with 5 additions and 5 deletions
|
|
@ -20,16 +20,16 @@ export class LoginComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
showCredentials(): void {
|
showCredentials(): void {
|
||||||
console.log('Login :', this.login);
|
// console.log('Login :', this.login);
|
||||||
console.log('Password :', this.password);
|
// console.log('Password :', this.password);
|
||||||
this.auth.sendAuthentication(this.login, this.password).subscribe(data => {
|
this.auth.sendAuthentication(this.login, this.password).subscribe(data => {
|
||||||
this.auth.finalizeAuthentication(data);
|
this.auth.finalizeAuthentication(data);
|
||||||
if (this.auth.islog === true) {
|
if (this.auth.islog) {
|
||||||
sessionStorage.setItem('login', this.login);
|
sessionStorage.setItem('login', this.login);
|
||||||
this.router.navigateByUrl('/general');
|
this.router.navigateByUrl('/chat');
|
||||||
} else {
|
} else {
|
||||||
this.errorMessage = data.data.reason;
|
this.errorMessage = data.data.reason;
|
||||||
console.log(this.errorMessage);
|
//console.log(this.errorMessage);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue