chore: use ChallengesFixVersion that client provides #2190

Merged
Sainan merged 1 commits from ChallengesFixVersion into main 2025-06-18 05:51:21 -07:00
3 changed files with 7 additions and 3 deletions
Showing only changes of commit fb444c7a7c - Show all commits

View File

@ -11,8 +11,11 @@ export const updateChallengeProgressController: RequestHandler = async (req, res
const inventory = await getInventory(
account._id.toString(),
"ChallengeProgress SeasonChallengeHistory Affiliations"
"ChallengesFixVersion ChallengeProgress SeasonChallengeHistory Affiliations"
);
if (challenges.ChallengesFixVersion !== undefined) {
inventory.ChallengesFixVersion = challenges.ChallengesFixVersion;
}
let affiliationMods: IAffiliationMods[] = [];
if (challenges.ChallengeProgress) {
affiliationMods = addChallenges(
@ -40,6 +43,7 @@ export const updateChallengeProgressController: RequestHandler = async (req, res
};
interface IUpdateChallengeProgressRequest {
ChallengesFixVersion?: number;
ChallengeProgress?: IChallengeProgress[];
SeasonChallengeHistory?: ISeasonChallenge[];
SeasonChallengeCompletions?: ISeasonChallenge[];

View File

@ -1703,7 +1703,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
LastInventorySync: Schema.Types.ObjectId,
Mailbox: MailboxSchema,
HandlerPoints: Number,
ChallengesFixVersion: { type: Number, default: 6 },
ChallengesFixVersion: Number,
PlayedParkourTutorial: Boolean,
//ActiveLandscapeTraps: [Schema.Types.Mixed],
//RepVotes: [Schema.Types.Mixed],

View File

@ -234,7 +234,7 @@ export interface IInventoryClient extends IDailyAffiliations, InventoryClientEqu
HandlerPoints: number;
MiscItems: IMiscItem[];
HasOwnedVoidProjectionsPreviously?: boolean;
ChallengesFixVersion: number;
ChallengesFixVersion?: number;
ChallengeProgress: IChallengeProgress[];
RawUpgrades: IRawUpgrade[];
ReceivedStartingGear: boolean;