Actually log failures in console

This commit is contained in:
regalijan 2023-10-19 16:51:12 -04:00
parent a9dec97e7f
commit 474497551f
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -9,8 +9,11 @@ export async function onRequestGet(context: RequestContext) {
<body> <body>
<div class="cf-turnstile" data-callback="returnToken" data-error-callback="handleError" data-sitekey="${context.env.TURNSTILE_SITEKEY}"></div> <div class="cf-turnstile" data-callback="returnToken" data-error-callback="handleError" data-sitekey="${context.env.TURNSTILE_SITEKEY}"></div>
<script> <script>
function handleError(_error) { function handleError(error) {
console.error(error);
window.flutter_inappwebview.callHandler("onToken", null); window.flutter_inappwebview.callHandler("onToken", null);
return true;
} }
function returnToken(token) { function returnToken(token) {