fix: worldState growing with every request #760

Merged
Sainan merged 3 commits from worldstate-fix into main 2025-01-09 21:23:25 -08:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 99416123d1 - Show all commits

View File

@ -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);

View File

@ -1078,7 +1078,6 @@
"ConstructionProjects": [],
"TwitchPromos": [],
"ExperimentRecommended": [],
"EndlessXpChoices": [],
"ForceLogoutVersion": 0,
"SeasonInfo": {
"Activation": { "$date": { "$numberLong": "1715796000000" } },