mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-17 22:29:52 +08:00
Merge branch 'master' into newads
This commit is contained in:
commit
b1443a1170
1 changed files with 9 additions and 5 deletions
|
|
@ -176,11 +176,15 @@ export async function addResult(
|
|||
if (req.ctx.configuration.users.lastHashesCheck.enabled) {
|
||||
let lastHashes = user.lastReultHashes ?? [];
|
||||
if (lastHashes.includes(resulthash)) {
|
||||
Logger.logToDb("duplicate_result", {
|
||||
lastHashes,
|
||||
resulthash,
|
||||
result,
|
||||
});
|
||||
Logger.logToDb(
|
||||
"duplicate_result",
|
||||
{
|
||||
lastHashes,
|
||||
resulthash,
|
||||
result,
|
||||
},
|
||||
uid
|
||||
);
|
||||
const status = MonkeyStatusCodes.DUPLICATE_RESULT;
|
||||
throw new MonkeyError(status.code, "Duplicate result");
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue