summaryrefslogtreecommitdiff
path: root/www/scripts
diff options
context:
space:
mode:
authoraltaf-creator <dev@altafcreator.com>2026-05-01 12:27:42 +0800
committeraltaf-creator <dev@altafcreator.com>2026-05-01 12:27:42 +0800
commitcdfdd3a2d6bdd2ac37e2bd237b6e760864e41db1 (patch)
tree5d692d9c28b01b4d508f94edd7a3b5e21cdee453 /www/scripts
parentdb1c6676a13798ee57dbac429a1d5045b60356fb (diff)
new backend + turnstile
Diffstat (limited to 'www/scripts')
-rw-r--r--www/scripts/captcha.js17
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");
+ }
+}