mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-12 06:33:22 +08:00
parsefloat
This commit is contained in:
parent
0797327f1d
commit
6e3e2d736d
2 changed files with 2 additions and 1 deletions
|
@ -43,6 +43,7 @@ class ResultController {
|
|||
try {
|
||||
const { uid } = req.decodedToken;
|
||||
const { result } = req.body;
|
||||
result.testDuration = parseFloat(result.testDuration);
|
||||
if (validateObjectValues(result) > 0)
|
||||
return res.status(400).json({ message: "Bad input" });
|
||||
if (
|
||||
|
|
|
@ -620,7 +620,7 @@ export function update() {
|
|||
tt = (parseFloat(result.mode2) / parseFloat(result.wpm)) * 60;
|
||||
}
|
||||
} else {
|
||||
tt = result.testDuration;
|
||||
tt = parseFloat(result.testDuration);
|
||||
}
|
||||
|
||||
tt += (result.incompleteTestSeconds ?? 0) - (result.afkDuration ?? 0);
|
||||
|
|
Loading…
Reference in a new issue