aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/cleaners/skyblock/member.js11
-rw-r--r--build/cleaners/skyblock/profiles.js1
-rw-r--r--build/hypixelCached.js4
3 files changed, 11 insertions, 5 deletions
diff --git a/build/cleaners/skyblock/member.js b/build/cleaners/skyblock/member.js
index 9d10a5e..39324de 100644
--- a/build/cleaners/skyblock/member.js
+++ b/build/cleaners/skyblock/member.js
@@ -20,12 +20,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.cleanSkyBlockProfileMemberResponse = exports.cleanSkyBlockProfileMemberResponseBasic = void 0;
-const cached = __importStar(require("../../hypixelCached"));
-const fairysouls_1 = require("./fairysouls");
+const stats_1 = require("./stats");
const inventory_1 = require("./inventory");
-const minions_1 = require("./minions");
+const fairysouls_1 = require("./fairysouls");
const objectives_1 = require("./objectives");
-const stats_1 = require("./stats");
+const minions_1 = require("./minions");
+const skills_1 = require("./skills");
+const cached = __importStar(require("../../hypixelCached"));
async function cleanSkyBlockProfileMemberResponseBasic(member, included = null) {
return {
uuid: member.uuid,
@@ -44,11 +45,13 @@ async function cleanSkyBlockProfileMemberResponse(member, included = null) {
username: await cached.usernameFromUser(member.uuid),
last_save: member.last_save,
first_join: member.first_join,
+ purse: member.coin_purse,
stats: stats_1.cleanProfileStats(member),
minions: minions_1.cleanMinions(member),
fairy_souls: fairysouls_1.cleanFairySouls(member),
inventories: inventoriesIncluded ? await inventory_1.cleanInventories(member) : undefined,
objectives: objectives_1.cleanObjectives(member),
+ skills: skills_1.cleanSkills(member)
};
}
exports.cleanSkyBlockProfileMemberResponse = cleanSkyBlockProfileMemberResponse;
diff --git a/build/cleaners/skyblock/profiles.js b/build/cleaners/skyblock/profiles.js
index b481e09..b79fc56 100644
--- a/build/cleaners/skyblock/profiles.js
+++ b/build/cleaners/skyblock/profiles.js
@@ -10,6 +10,7 @@ function cleanPlayerSkyblockProfiles(rawProfiles) {
name: profile.cute_name
});
}
+ console.log('cleanPlayerSkyblockProfiles', profiles);
return profiles;
}
exports.cleanPlayerSkyblockProfiles = cleanPlayerSkyblockProfiles;
diff --git a/build/hypixelCached.js b/build/hypixelCached.js
index bf01171..cb8d0db 100644
--- a/build/hypixelCached.js
+++ b/build/hypixelCached.js
@@ -107,7 +107,9 @@ async function fetchPlayer(user) {
path: 'player',
args: { uuid: playerUuid }
});
- playerCache.set(playerUuid, cleanPlayer);
+ // clone in case it gets modified somehow later
+ const cleanPlayerClone = Object.assign({}, cleanPlayer);
+ playerCache.set(playerUuid, cleanPlayerClone);
return cleanPlayer;
}
exports.fetchPlayer = fetchPlayer;