This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user