From 0733fdf4072cd6e62a764d10540d8ed121ecb43f Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Tue, 11 Nov 2025 03:51:20 +0100 Subject: [PATCH 1/2] fix: give ChallengeProgress with unlockAllScans cheat Closes #3013 --- src/controllers/custom/unlockAllScansController.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/controllers/custom/unlockAllScansController.ts b/src/controllers/custom/unlockAllScansController.ts index fb79251e..ca7990cb 100644 --- a/src/controllers/custom/unlockAllScansController.ts +++ b/src/controllers/custom/unlockAllScansController.ts @@ -3,10 +3,12 @@ import allScans from "../../../static/fixed_responses/allScans.json" with { type import { ExportEnemies } from "warframe-public-export-plus"; import { getAccountIdForRequest } from "../../services/loginService.ts"; import { getStats } from "../../services/statsService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; export const unlockAllScansController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); const stats = await getStats(accountId); + const inventory = await getInventory(accountId, "ChallengeProgress"); const scanTypes = new Set(allScans); for (const type of Object.keys(ExportEnemies.avatars)) { @@ -18,6 +20,18 @@ export const unlockAllScansController: RequestHandler = async (req, res) => { stats.Scans.push({ type, scans: 9999 }); } + const jsCodex = inventory.ChallengeProgress.find(x => x.Name === "JSCodexScan"); + + if (jsCodex) { + jsCodex.Progress = 1; + } else { + inventory.ChallengeProgress.push({ + Name: "JSCodexScan", + Progress: 1 + }); + } + await stats.save(); + await inventory.save(); res.end(); }; -- 2.49.1 From fd04055a4e93056cedac58652939cb9269f70dfc Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Thu, 13 Nov 2025 09:18:45 +0100 Subject: [PATCH 2/2] parallelise --- src/controllers/custom/unlockAllScansController.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/controllers/custom/unlockAllScansController.ts b/src/controllers/custom/unlockAllScansController.ts index ca7990cb..684c75ab 100644 --- a/src/controllers/custom/unlockAllScansController.ts +++ b/src/controllers/custom/unlockAllScansController.ts @@ -7,8 +7,7 @@ import { getInventory } from "../../services/inventoryService.ts"; export const unlockAllScansController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); - const stats = await getStats(accountId); - const inventory = await getInventory(accountId, "ChallengeProgress"); + const [stats, inventory] = await Promise.all([getStats(accountId), getInventory(accountId, "ChallengeProgress")]); const scanTypes = new Set(allScans); for (const type of Object.keys(ExportEnemies.avatars)) { @@ -31,7 +30,6 @@ export const unlockAllScansController: RequestHandler = async (req, res) => { }); } - await stats.save(); - await inventory.save(); + await Promise.all([stats.save(), inventory.save()]); res.end(); }; -- 2.49.1