From ab3618a632d92b9d15122a210e8bbd89fb454e7a Mon Sep 17 00:00:00 2001 From: Chneemann Date: Wed, 4 Sep 2024 18:06:15 +0200 Subject: [PATCH] bugfix guest login --- frontend/src/app/components/auth/login/login.component.html | 2 +- frontend/src/app/components/auth/login/login.component.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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); } }