From c9d4712565ba53a43bffb840369775e285e08d8f Mon Sep 17 00:00:00 2001 From: Sainan Date: Thu, 20 Jun 2024 11:48:12 +0200 Subject: [PATCH] fix: miscellaneous inaccuracies (#330) Co-authored-by: Sainan --- src/models/inventoryModels/inventoryModel.ts | 23 +++++++++++--------- src/types/inventoryTypes/inventoryTypes.ts | 2 +- static/webui/script.js | 5 +---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/models/inventoryModels/inventoryModel.ts b/src/models/inventoryModels/inventoryModel.ts index 2dc26ef8e..aed248007 100644 --- a/src/models/inventoryModels/inventoryModel.ts +++ b/src/models/inventoryModels/inventoryModel.ts @@ -161,14 +161,17 @@ const ItemConfigSchema = new Schema( facial: colorSchema, syancol: colorSchema, Upgrades: [String], - Songs: [ - { - m: String, - b: String, - p: String, - s: String - } - ], + Songs: { + type: [ + { + m: String, + b: String, + p: String, + s: String + } + ], + default: undefined + }, Name: String, AbilityOverride: abilityOverrideSchema, PvpUpgrades: [String], @@ -888,7 +891,7 @@ const inventorySchema = new Schema( ChallengesFixVersion: Number, PlayedParkourTutorial: Boolean, SubscribedToEmailsPersonalized: Number, - LastInventorySync: Schema.Types.Mixed, + LastInventorySync: Schema.Types.Mixed, // this should be Schema.Types.ObjectId, but older inventories may break with that. ActiveLandscapeTraps: [Schema.Types.Mixed], RepVotes: [Schema.Types.Mixed], LeagueTickets: [Schema.Types.Mixed], @@ -914,7 +917,7 @@ const inventorySchema = new Schema( //Grustag three DeathSquadable: Boolean }, - { timestamps: { createdAt: "Created", updatedAt: "LastInventorySync" } } + { timestamps: { createdAt: "Created" } } ); inventorySchema.set("toJSON", { diff --git a/src/types/inventoryTypes/inventoryTypes.ts b/src/types/inventoryTypes/inventoryTypes.ts index d538a7a24..1a2018884 100644 --- a/src/types/inventoryTypes/inventoryTypes.ts +++ b/src/types/inventoryTypes/inventoryTypes.ts @@ -170,7 +170,7 @@ export interface IInventoryResponse { SpectreLoadouts: ISpectreLoadout[]; SentinelWeapons: IEquipmentDatabase[]; Sentinels: IEquipmentDatabase[]; - EmailItems: ITypeXPItem[]; + EmailItems: ITypeCount[]; CompletedSyndicates: string[]; FocusXP: IFocusXP; Wishlist: string[]; diff --git a/static/webui/script.js b/static/webui/script.js index bc1e87587..0090d4270 100644 --- a/static/webui/script.js +++ b/static/webui/script.js @@ -109,10 +109,7 @@ window.itemListPromise = new Promise(resolve => { items.forEach(item => { if (item.uniqueName in data.badItems) { item.name += " (Imposter)"; - } else if ( - item.uniqueName.substr(0, 18) != "/Lotus/Types/Game/" && - item.uniqueName.substr(0, 18) != "/Lotus/StoreItems/" - ) { + } else if (item.uniqueName.substr(0, 18) != "/Lotus/Types/Game/") { const option = document.createElement("option"); option.setAttribute("data-key", item.uniqueName); option.value = item.name;