chore: handle updateQuest request having CompletionDate
All checks were successful
Build / build (pull_request) Successful in 1m45s

The client date representation would produce a schema error
This commit is contained in:
Sainan 2025-10-18 11:07:24 +02:00
parent 86998b6760
commit 8b1b1b13ab

View File

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