diff options
author | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-16 18:17:13 +0100 |
---|---|---|
committer | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-16 18:17:13 +0100 |
commit | 5a04e31b7e63663f548fa7d9119ab947be46aedf (patch) | |
tree | 6d093d64c471166ef6d649c24f41d80d8a568296 /frontend/src/app/_modals | |
parent | d96b69f4ca8eac83140b3b451f59621aed2bb517 (diff) | |
parent | cba3740a4f35d91421f5a185195bdfc087810b8a (diff) |
Merge branch 'dev' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into dev
Diffstat (limited to 'frontend/src/app/_modals')
-rw-r--r-- | frontend/src/app/_modals/login-modal/login-modal.component.ts | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/frontend/src/app/_modals/login-modal/login-modal.component.ts b/frontend/src/app/_modals/login-modal/login-modal.component.ts index 87686f10..d17d7017 100644 --- a/frontend/src/app/_modals/login-modal/login-modal.component.ts +++ b/frontend/src/app/_modals/login-modal/login-modal.component.ts @@ -25,13 +25,16 @@ export class LoginModalComponent implements OnInit { } doLogin() { - this.authService.login(this.username, this.password).subscribe((response) => { //ako nisu ok podaci, ne ide hide nego mora opet da ukucava!!!!podesi - console.log(response); - this.authService.authenticate(response); - (<HTMLSelectElement>document.getElementById('closeButton')).click(); - }, error => { - console.warn(error); //NETACNI PODACI - }); + if (this.username.length > 0 && this.password.length > 0) { + this.authService.login(this.username, this.password).subscribe((response) => { //ako nisu ok podaci, ne ide hide nego mora opet da ukucava!!!!podesi + console.log(response); + this.authService.authenticate(response); + (<HTMLSelectElement>document.getElementById('closeButton')).click(); + }, error => { + console.warn(error); //NETACNI PODACI + }); + } + } resetData() { this.username = ''; |