fix: address some client warnings about malformed inventory.php response #840

Merged
Sainan merged 5 commits from inventory-fix into main 2025-01-24 05:17:53 -08:00
2 changed files with 4 additions and 1 deletions
Showing only changes of commit 0f08262d77 - Show all commits

View File

@ -16,6 +16,8 @@ import {
} from "warframe-public-export-plus";
import { handleSubsumeCompletion } from "./infestedFoundryController";
import { allDailyAffiliationKeys } from "@/src/services/inventoryService";
import { toOid } from "@/src/helpers/inventoryHelpers";
import { Types } from "mongoose";
export const inventoryController: RequestHandler = async (request, response) => {
const account = await getAccountForRequest(request);
@ -247,6 +249,8 @@ export const inventoryController: RequestHandler = async (request, response) =>
// This determines if the "void fissures" tab is shown in navigation.
inventoryResponse.HasOwnedVoidProjectionsPreviously = true;
inventoryResponse.LastInventorySync = toOid(new Types.ObjectId());
response.json(inventoryResponse);
};

View File

@ -1111,7 +1111,6 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
ChallengesFixVersion: Number,
PlayedParkourTutorial: Boolean,
SubscribedToEmailsPersonalized: Number,
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],