diff --git a/src/main/client/src/app/shared/user/user.service.ts b/src/main/client/src/app/shared/user/user.service.ts index c508ace..1c21d2d 100644 --- a/src/main/client/src/app/shared/user/user.service.ts +++ b/src/main/client/src/app/shared/user/user.service.ts @@ -27,6 +27,7 @@ export class UserService { } loginUser(username: string, password: string) { + let success = true; this.authService.loginUser(username, password) .then(loginResponse => { @@ -39,8 +40,13 @@ export class UserService { }) .catch( err => { console.log("can't get the user: " + err); - }) + }); + success = true; }) + .catch(error => { + success = false; + }); + return success; } updateUser(userRequest: UserDto) { diff --git a/src/main/client/src/app/welcome/login/login.component.html b/src/main/client/src/app/welcome/login/login.component.html index 1b210b8..fa897f4 100644 --- a/src/main/client/src/app/welcome/login/login.component.html +++ b/src/main/client/src/app/welcome/login/login.component.html @@ -1,56 +1,53 @@ -