diff options
Diffstat (limited to 'www/scripts')
| -rw-r--r-- | www/scripts/captcha.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/www/scripts/captcha.js b/www/scripts/captcha.js new file mode 100644 index 0000000..2a58534 --- /dev/null +++ b/www/scripts/captcha.js @@ -0,0 +1,17 @@ +async function onTurnstileSuccess(token) { + const response = await fetch("https://backend.altafcreator.com", { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({"token": token}), + }); + + const result = await response.json(); + + if (result.status) { + alert(result); + } else { + alert("fail"); + } +} |
