chore: handle updateQuest request having CompletionDate (#2909)

The client date representation would produce a schema error

Reviewed-on: OpenWF/SpaceNinjaServer#2909
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
Sainan 2025-10-18 23:44:28 -07:00 committed by Sainan
parent 86998b6760
commit db112ee5ed

View File

@ -13,7 +13,7 @@ import questCompletionItems from "../../static/fixed_responses/questCompletionRe
import type { ITypeCount } from "../types/commonTypes.ts"; import type { ITypeCount } from "../types/commonTypes.ts";
export interface IUpdateQuestRequest { export interface IUpdateQuestRequest {
QuestKeys: Omit<IQuestKeyDatabase, "CompletionDate">[]; QuestKeys: IQuestKeyClient[];
PS: string; PS: string;
questCompletion: boolean; questCompletion: boolean;
PlayerShipEvents: unknown[]; PlayerShipEvents: unknown[];
@ -36,6 +36,7 @@ export const updateQuestKey = async (
throw new Error(`quest key ${questKeyUpdate[0].ItemType} not found`); throw new Error(`quest key ${questKeyUpdate[0].ItemType} not found`);
} }
delete questKeyUpdate[0].CompletionDate;
inventory.QuestKeys[questKeyIndex].overwrite(questKeyUpdate[0]); inventory.QuestKeys[questKeyIndex].overwrite(questKeyUpdate[0]);
const inventoryChanges: IInventoryChanges = {}; const inventoryChanges: IInventoryChanges = {};