aboutsummaryrefslogtreecommitdiff
path: root/src/cleaners
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2021-05-27 16:56:50 -0500
committerGitHub <noreply@github.com>2021-05-27 16:56:50 -0500
commitc9097dc2d0749fa63fd731423bc87a5452f0444d (patch)
tree50afe6b99cf3ed6bd7369e804316c05c7407b5ca /src/cleaners
parenta3662fb5888bd031b27cc81028ba86b0271eb442 (diff)
downloadskyblock-api-c9097dc2d0749fa63fd731423bc87a5452f0444d.tar.gz
skyblock-api-c9097dc2d0749fa63fd731423bc87a5452f0444d.tar.bz2
skyblock-api-c9097dc2d0749fa63fd731423bc87a5452f0444d.zip
Profile customization (#45)
* add basic discord auth * add uuid dependency * add lastUpdated to sessions * add route to get session from id * add accounts collection * update build * add gm rank * add `customization` url parameter * add customization parameter to /player/:user * add route to get info from discord id * remove a console.log * Update database.js * Update package.json * fix tests
Diffstat (limited to 'src/cleaners')
-rw-r--r--src/cleaners/rank.ts2
-rw-r--r--src/cleaners/skyblock/member.ts2
-rw-r--r--src/cleaners/skyblock/slayers.ts3
3 files changed, 4 insertions, 3 deletions
diff --git a/src/cleaners/rank.ts b/src/cleaners/rank.ts
index 997888c..2d80e31 100644
--- a/src/cleaners/rank.ts
+++ b/src/cleaners/rank.ts
@@ -46,8 +46,8 @@ export function cleanRank({
name = newPackageRank?.replace('_PLUS', '+')
?? packageRank?.replace('_PLUS', '+')
- // MVP++ is called Superstar for some reason
switch (name) {
+ // MVP++ is called Superstar for some reason
case 'SUPERSTAR':
name = 'MVP++'
break
diff --git a/src/cleaners/skyblock/member.ts b/src/cleaners/skyblock/member.ts
index 7a57975..0ec2c0a 100644
--- a/src/cleaners/skyblock/member.ts
+++ b/src/cleaners/skyblock/member.ts
@@ -5,6 +5,7 @@ import { cleanObjectives, Objective } from './objectives'
import { CleanFullProfileBasicMembers } from './profile'
import { cleanProfileStats, StatItem } from './stats'
import { CleanMinion, cleanMinions } from './minions'
+import { AccountCustomization } from '../../database'
import { cleanSlayers, SlayerData } from './slayers'
import { cleanVisitedZones, Zone } from './zones'
import { cleanSkills, Skill } from './skills'
@@ -108,4 +109,5 @@ export interface CleanMemberProfilePlayer extends CleanPlayer {
export interface CleanMemberProfile {
member: CleanMemberProfilePlayer
profile: CleanFullProfileBasicMembers
+ customization: AccountCustomization
}
diff --git a/src/cleaners/skyblock/slayers.ts b/src/cleaners/skyblock/slayers.ts
index e9c5cb6..7892eaf 100644
--- a/src/cleaners/skyblock/slayers.ts
+++ b/src/cleaners/skyblock/slayers.ts
@@ -6,8 +6,7 @@ const SLAYER_NAMES = {
wolf: 'sven'
} as const
-type ApiSlayerName = keyof typeof SLAYER_NAMES
-type SlayerName = (typeof SLAYER_NAMES)[ApiSlayerName]
+type SlayerName = (typeof SLAYER_NAMES)[keyof typeof SLAYER_NAMES]
interface SlayerTier {
tier: number,