From 8f0f63182e69ce51ce73d40e7e52a518707ac89b Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 5 Apr 2023 10:41:01 +0200 Subject: [PATCH] logging version --- backend/src/anticheat/index.ts | 2 +- backend/src/api/controllers/result.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/anticheat/index.ts b/backend/src/anticheat/index.ts index 1b9b1eff4..9b10df14e 100644 --- a/backend/src/anticheat/index.ts +++ b/backend/src/anticheat/index.ts @@ -2,7 +2,7 @@ export function implemented(): boolean { return false; } -export function validateResult(_result: object): boolean { +export function validateResult(_result: object, _version: string): boolean { return true; } diff --git a/backend/src/api/controllers/result.ts b/backend/src/api/controllers/result.ts index 46b04af16..a35851667 100644 --- a/backend/src/api/controllers/result.ts +++ b/backend/src/api/controllers/result.ts @@ -197,7 +197,7 @@ export async function addResult( } if (anticheatImplemented()) { - if (!validateResult(result)) { + if (!validateResult(result, req.headers["client-version"] as string)) { const status = MonkeyStatusCodes.RESULT_DATA_INVALID; throw new MonkeyError(status.code, "Result data doesn't make sense"); }