aboutsummaryrefslogtreecommitdiff
path: root/src/database.ts
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-04-30 00:20:49 -0500
committermat <github@matdoes.dev>2022-04-30 00:20:49 -0500
commit2240140136b9dfc0faeb1d29edf037609f9e8c9c (patch)
tree93419b5b0db5961ad1bf75840dffac3461a8f0fe /src/database.ts
parent41bfebfba8eb0c2f830e01f03f8765865e8108b0 (diff)
downloadskyblock-api-2240140136b9dfc0faeb1d29edf037609f9e8c9c.tar.gz
skyblock-api-2240140136b9dfc0faeb1d29edf037609f9e8c9c.tar.bz2
skyblock-api-2240140136b9dfc0faeb1d29edf037609f9e8c9c.zip
revamp skills api
Diffstat (limited to 'src/database.ts')
-rw-r--r--src/database.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/database.ts b/src/database.ts
index 8b606d4..04b3825 100644
--- a/src/database.ts
+++ b/src/database.ts
@@ -159,9 +159,10 @@ function getMemberCollectionAttributes(member: CleanMember): StringNumber {
}
function getMemberSkillAttributes(member: CleanMember): StringNumber {
+ if (!member.skills.apiEnabled) return {}
const skillAttributes = {}
- for (const collection of member.skills) {
- const skillLeaderboardName = `skill_${collection.name}`
+ for (const collection of member.skills.list) {
+ const skillLeaderboardName = `skill_${collection.id}`
skillAttributes[skillLeaderboardName] = collection.xp
}
return skillAttributes