[CST-6782] Fix

This commit is contained in:
Davide Negretti
2022-09-29 22:07:15 +02:00
parent 614ce4aa83
commit c69934aab6
3 changed files with 4 additions and 4 deletions

View File

@@ -115,7 +115,7 @@ export class RegisterEmailFormComponent implements OnInit {
if (captchaVersion === 'v3') {
return this.googleRecaptchaService.getRecaptchaToken('register_email');
} else if (captchaVersion === 'v2' && captchaMode === 'checkbox') {
return this.googleRecaptchaService.getRecaptchaTokenResponse();
return of(this.googleRecaptchaService.getRecaptchaTokenResponse());
} else if (captchaVersion === 'v2' && captchaMode === 'invisible') {
return of(tokenV2);
} else {

View File

@@ -20,7 +20,7 @@ export class GoogleRecaptchaComponent implements OnInit {
*/
@Output() executeRecaptcha: EventEmitter<any> = new EventEmitter();
@Output() checkboxChecked: EventEmitter<any> = new EventEmitter();
@Output() checkboxChecked: EventEmitter<boolean> = new EventEmitter();
@Output() showNotification: EventEmitter<any> = new EventEmitter();
@@ -50,7 +50,7 @@ export class GoogleRecaptchaComponent implements OnInit {
this.executeRecaptcha.emit($event);
break;
case 'checkbox':
this.checkboxChecked.emit(isNotEmpty($event)); // todo fix con boolean
this.checkboxChecked.emit(isNotEmpty($event));
break;
default:
console.error(`Invalid reCaptcha mode '${this.captchaMode}`);