From bb94c2d8e2ac593e375f049e09e8c9e658ea5c60 Mon Sep 17 00:00:00 2001 From: Gaspar Acevedo Zain <43762887+gasper-az@users.noreply.github.com> Date: Fri, 20 Dec 2024 12:33:39 -0300 Subject: [PATCH] [fix] remove recaptcha references --- src/lib/applications.js | 4 ++-- src/lib/games.js | 21 +++++++++++---------- src/pages/[lang]/contributing/games.astro | 7 +------ 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/src/lib/applications.js b/src/lib/applications.js index 2799f703..5ff9509e 100644 --- a/src/lib/applications.js +++ b/src/lib/applications.js @@ -51,7 +51,7 @@ form.addEventListener("submit", (e) => { // showErrorAlert(errorAlertId, errorAlertInnerElementId, false, ""); // }, 3000); // } else - { + // { var data = new FormData(form) fetch(`${import.meta.env.PUBLIC_API_HOST}${import.meta.env.PUBLIC_APPLICATION_API_ENDPOINT}`, { method: "POST", @@ -93,7 +93,7 @@ form.addEventListener("submit", (e) => { showErrorAlert(errorAlertId, errorAlertInnerElementId, false, ''); }, 3000); }) - }; + // }; }); //######################################## Loader ########################################// diff --git a/src/lib/games.js b/src/lib/games.js index d60ce925..078528e4 100644 --- a/src/lib/games.js +++ b/src/lib/games.js @@ -14,20 +14,21 @@ form.addEventListener("submit", (e) => { e.preventDefault(); pageLoading(true); - var captchaVerificationToken = grecaptcha.getResponse(); - if (captchaVerificationToken.length == 0) { - showSuccessAlert(successAlertId, false); - showErrorAlert(errorAlertId, errorAlertInnerElementId, true, ErrorMessages.MISSING_CAPTCHA_ERROR); - setTimeout(() => { - showErrorAlert(errorAlertId, errorAlertInnerElementId, false, ''); - }, 3000); - } else { + // var captchaVerificationToken = grecaptcha.getResponse(); + // if (captchaVerificationToken.length == 0) { + // showSuccessAlert(successAlertId, false); + // showErrorAlert(errorAlertId, errorAlertInnerElementId, true, ErrorMessages.MISSING_CAPTCHA_ERROR); + // setTimeout(() => { + // showErrorAlert(errorAlertId, errorAlertInnerElementId, false, ''); + // }, 3000); + // } else { var data = new FormData(form); fetch(`${import.meta.env.PUBLIC_API_HOST}${import.meta.env.PUBLIC_GAME_API_ENDPOINT}`, { method: "POST", body: JSON.stringify({ "name": data.get("name"), - "token": captchaVerificationToken, + // "token": captchaVerificationToken, + "token": "", "publisher": data.get("publisher"), "categories": data.get("categories") ?? "", "compatibility": data.get("compatibility") ?? "", @@ -65,7 +66,7 @@ form.addEventListener("submit", (e) => { showErrorAlert(errorAlertId, errorAlertInnerElementId, false, ''); }, 3000); }) - } + // } }); //######################################## Loader ########################################// diff --git a/src/pages/[lang]/contributing/games.astro b/src/pages/[lang]/contributing/games.astro index 006bd150..f39c5592 100644 --- a/src/pages/[lang]/contributing/games.astro +++ b/src/pages/[lang]/contributing/games.astro @@ -11,7 +11,6 @@ export function getStaticPaths() { } const locale = updateLanguage(Astro.url); -const recaptcha_url = `https://www.google.com/recaptcha/api.js?hl=${locale}`; --- {t('game_form.your_name_gamertag')} -
-
-
@@ -144,5 +140,4 @@ const recaptcha_url = `https://www.google.com/recaptcha/api.js?hl=${locale}`;
- - + \ No newline at end of file