bugfix guest login
This commit is contained in:
parent
3907f1df29
commit
ab3618a632
2 changed files with 4 additions and 2 deletions
|
|
@ -94,7 +94,7 @@
|
||||||
(!!authData.mail && !!authData.password) ||
|
(!!authData.mail && !!authData.password) ||
|
||||||
authData.send
|
authData.send
|
||||||
"
|
"
|
||||||
(click)="guestLogin()"
|
(click)="guestLogin(loginForm)"
|
||||||
></app-btn-large>
|
></app-btn-large>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ export class LoginComponent {
|
||||||
return emailRegex.test(emailValue);
|
return emailRegex.test(emailValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
async guestLogin() {
|
async guestLogin(ngForm: NgForm) {
|
||||||
this.authData.mail = environment.guestMail;
|
this.authData.mail = environment.guestMail;
|
||||||
this.authData.password = environment.guestPassword;
|
this.authData.password = environment.guestPassword;
|
||||||
this.authData.guestLogin = true;
|
this.authData.guestLogin = true;
|
||||||
|
|
@ -54,6 +54,8 @@ export class LoginComponent {
|
||||||
this.errorService.clearError();
|
this.errorService.clearError();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.authData.send = false;
|
this.authData.send = false;
|
||||||
|
this.authData.guestLogin = false;
|
||||||
|
ngForm.reset();
|
||||||
this.errorService.handleError(error);
|
this.errorService.handleError(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue