From 7ed56db4e0eca137ff79dd0c2d9d02ccbbcec29a Mon Sep 17 00:00:00 2001 From: Miodec Date: Mon, 30 Sep 2024 14:05:26 +0200 Subject: [PATCH] chore: move comment --- backend/src/api/controllers/result.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/backend/src/api/controllers/result.ts b/backend/src/api/controllers/result.ts index 092030a3f..c964cb371 100644 --- a/backend/src/api/controllers/result.ts +++ b/backend/src/api/controllers/result.ts @@ -276,8 +276,6 @@ export async function addResult( ) { const status = MonkeyStatusCodes.RESULT_DATA_INVALID; throw new MonkeyError(status.code, "Result data doesn't make sense"); - } else if (isDevEnvironment()) { - Logger.success("Result data validated"); } } else { if (!isDevEnvironment()) { @@ -300,7 +298,6 @@ export async function addResult( // ); // return res.status(400).json({ message: "Time traveler detected" }); - //convert result test duration to miliseconds //get latest result ordered by timestamp let lastResultTimestamp: null | number = null; try { @@ -309,6 +306,7 @@ export async function addResult( // } + //convert result test duration to miliseconds completedEvent.timestamp = Math.floor(Date.now() / 1000) * 1000; //check if now is earlier than last result plus duration (-1 second as a buffer)