Skip to content

Commit 52fdc66

Browse files
committed
chore: log payload / result
1 parent 7e48100 commit 52fdc66

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/services/captcha.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,19 @@ export async function verifyCaptcha(
1212
captchaToken: string,
1313
requestorIp: string,
1414
): Promise<CaptchaResponse> {
15+
const payload = {
16+
secret: captchaSecret,
17+
response: captchaToken,
18+
remoteip: requestorIp,
19+
};
20+
21+
console.log('payload', payload);
22+
1523
const response = await axios.post<CaptchaResponse>(
1624
`https://challenges.cloudflare.com/turnstile/v0/siteverify`,
17-
{
18-
secret: captchaSecret,
19-
response: captchaToken,
20-
remoteip: requestorIp,
21-
},
25+
payload,
2226
);
2327
const captchaResult = response.data;
28+
console.log('captchaResult', captchaResult);
2429
return captchaResult;
2530
}

0 commit comments

Comments
 (0)