mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-20 15:26:15 +08:00
added another validation step to result saving
This commit is contained in:
parent
00403028f0
commit
c9423238bd
|
@ -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…
Reference in a new issue