mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-17 11:06:17 +08:00
overriding name later
This commit is contained in:
parent
7c711bc4c2
commit
12b4b899a5
1 changed files with 2 additions and 1 deletions
|
@ -92,7 +92,6 @@ export async function addResult(
|
|||
|
||||
const result = Object.assign({}, req.body.result);
|
||||
result.uid = uid;
|
||||
result.name = user.name;
|
||||
if (isTestTooShort(result)) {
|
||||
const status = MonkeyStatusCodes.TEST_TOO_SHORT;
|
||||
throw new MonkeyError(status.code, status.message);
|
||||
|
@ -122,6 +121,8 @@ export async function addResult(
|
|||
}
|
||||
}
|
||||
|
||||
result.name = user.name;
|
||||
|
||||
if (anticheatImplemented()) {
|
||||
if (!validateResult(result)) {
|
||||
const status = MonkeyStatusCodes.RESULT_DATA_INVALID;
|
||||
|
|
Loading…
Add table
Reference in a new issue