diff --git a/frontend/src/app/components/auth/login/login.component.html b/frontend/src/app/components/auth/login/login.component.html index f8d20d3..0a7523c 100644 --- a/frontend/src/app/components/auth/login/login.component.html +++ b/frontend/src/app/components/auth/login/login.component.html @@ -94,7 +94,7 @@ (!!authData.mail && !!authData.password) || authData.send " - (click)="guestLogin()" + (click)="guestLogin(loginForm)" > diff --git a/frontend/src/app/components/auth/login/login.component.ts b/frontend/src/app/components/auth/login/login.component.ts index e02afa9..62db88a 100644 --- a/frontend/src/app/components/auth/login/login.component.ts +++ b/frontend/src/app/components/auth/login/login.component.ts @@ -36,7 +36,7 @@ export class LoginComponent { return emailRegex.test(emailValue); } - async guestLogin() { + async guestLogin(ngForm: NgForm) { this.authData.mail = environment.guestMail; this.authData.password = environment.guestPassword; this.authData.guestLogin = true; @@ -54,6 +54,8 @@ export class LoginComponent { this.errorService.clearError(); } catch (error) { this.authData.send = false; + this.authData.guestLogin = false; + ngForm.reset(); this.errorService.handleError(error); } }