bugfix guest login

This commit is contained in:
Chneemann 2024-09-04 18:06:15 +02:00
parent 3907f1df29
commit ab3618a632
2 changed files with 4 additions and 2 deletions

View file

@ -94,7 +94,7 @@
(!!authData.mail && !!authData.password) ||
authData.send
"
(click)="guestLogin()"
(click)="guestLogin(loginForm)"
></app-btn-large>
</div>
</form>

View file

@ -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);
}
}