From 99416123d18fe393de396aa9694b23c452f409f9 Mon Sep 17 00:00:00 2001 From: Sainan Date: Fri, 10 Jan 2025 06:11:27 +0100 Subject: [PATCH] fix: EndlessXpChoices growing with every worldState request --- src/controllers/dynamic/worldStateController.ts | 5 +++-- static/fixed_responses/worldState.json | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/dynamic/worldStateController.ts b/src/controllers/dynamic/worldStateController.ts index b95e621b..b2a4888d 100644 --- a/src/controllers/dynamic/worldStateController.ts +++ b/src/controllers/dynamic/worldStateController.ts @@ -5,12 +5,13 @@ import { IMongoDate, IOid } from "@/src/types/commonTypes"; export const worldStateController: RequestHandler = (req, res) => { const worldState: IWorldState = { - ...staticWorldState, BuildLabel: typeof req.query.buildLabel == "string" ? req.query.buildLabel.split(" ").join("+") : buildConfig.buildLabel, - Time: Math.round(Date.now() / 1000) + Time: Math.round(Date.now() / 1000), + EndlessXpChoices: [], + ...staticWorldState }; const week = Math.trunc(new Date().getTime() / 604800000); diff --git a/static/fixed_responses/worldState.json b/static/fixed_responses/worldState.json index 54b6903a..14e34008 100644 --- a/static/fixed_responses/worldState.json +++ b/static/fixed_responses/worldState.json @@ -1078,7 +1078,6 @@ "ConstructionProjects": [], "TwitchPromos": [], "ExperimentRecommended": [], - "EndlessXpChoices": [], "ForceLogoutVersion": 0, "SeasonInfo": { "Activation": { "$date": { "$numberLong": "1715796000000" } },