Skip to content

Commit

Permalink
log recaptcha fails
Browse files Browse the repository at this point in the history
  • Loading branch information
howardchung committed Feb 16, 2024
1 parent 9694d86 commit 0f0b099
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -943,11 +943,11 @@ export class Room {
// console.log(validation?.data);
const isLowScore = validation?.data?.score < 0.1;
const failed = validation?.data?.success === false;
console.log('[RECAPTCHA] score: ', validation?.data?.score);
if (failed || isLowScore) {
if (isLowScore) {
redisCount('recaptchaRejectsLowScore');
} else {
console.log('[RECAPTCHA] score: ', validation?.data);
redisCount('recaptchaRejectsOther');
}
socket.emit('errorMessage', 'Invalid ReCAPTCHA.');
Expand Down

0 comments on commit 0f0b099

Please sign in to comment.