mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-17 21:03:31 +08:00
added another validation step to result saving
This commit is contained in:
parent
00403028f0
commit
c9423238bd
1 changed files with 8 additions and 0 deletions
|
|
@ -866,6 +866,14 @@ function validateResult(result) {
|
|||
}
|
||||
}
|
||||
|
||||
let wpmbad = false;
|
||||
result.wpm.forEach((w) => {
|
||||
if (w > 400) wpmbad = true;
|
||||
});
|
||||
if (wpmbad) return false;
|
||||
|
||||
if (result.consistency < 25) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue