Allow for req.body.archetype to be empty (random)

This commit is contained in:
PRO100KatYT
2024-06-29 17:11:45 +02:00
parent b63f8fe229
commit 8ac155dc3a

View File

@@ -7979,12 +7979,12 @@ express.post("/fortnite/api/game/v2/profile/*/client/SetActiveArchetype", async
var QueryRevision = req.query.rvn || -1; var QueryRevision = req.query.rvn || -1;
var StatChanged = false; var StatChanged = false;
if (req.body.archetypeGroup && req.body.archetype) { if (req.body.archetypeGroup) {
if (!profile.stats.attributes.hasOwnProperty("loadout_archetype_values")) { if (!profile.stats.attributes.hasOwnProperty("loadout_archetype_values")) {
profile.stats.attributes.loadout_archetype_values = {} profile.stats.attributes.loadout_archetype_values = {}
} }
profile.stats.attributes.loadout_archetype_values[req.body.archetypeGroup] = req.body.archetype; profile.stats.attributes.loadout_archetype_values[req.body.archetypeGroup] = req.body.archetype || "";
StatChanged = true; StatChanged = true;
} }