chore: handle updateQuest request having CompletionDate #2909
@ -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 = {};
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user