summaryrefslogtreecommitdiff
path: root/www/scripts/captcha.js
blob: 30951552b09b99d9dde42c4dfa9799f836eced27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
async function onTurnstileSuccess(token) {
	const response = await fetch("https://backend.altafcreator.com/email", {
		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");
	}
}