fix: give ChallengeProgress with unlockAllScans cheat #3020

Merged
Sainan merged 2 commits from AMelonInsideLemon/SpaceNinjaServer:fix-JSCodexScan into main 2025-11-14 01:49:49 -08:00
Showing only changes of commit fd04055a4e - Show all commits

View File

@@ -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<string>(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();
};