Skip to content

Commit

Permalink
chore: move comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Miodec committed Sep 30, 2024
1 parent b70930a commit 7ed56db
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions backend/src/api/controllers/result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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 {
Expand All @@ -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)
Expand Down

0 comments on commit 7ed56db

Please sign in to comment.