返回提交历史
Modified
src/services/questService.ts
+2
-1
XFEstudio/XFESpaceNinjaServer
chore: handle updateQuest request having CompletionDate (#2909)
The client date representation would produce a schema error Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2909 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
db112ee5
代码差异
1 个文件
+2
-1
@@ -13,7 +13,7 @@ import questCompletionItems from "../../static/fixed_responses/questCompletionRe
13
13
import type { ITypeCount } from "../types/commonTypes.ts";
14
14
15
15
export interface IUpdateQuestRequest {
16
QuestKeys: Omit<IQuestKeyDatabase, "CompletionDate">[];
16
QuestKeys: IQuestKeyClient[];
17
17
PS: string;
18
18
questCompletion: boolean;
19
19
PlayerShipEvents: unknown[];
@@ -36,6 +36,7 @@ export const updateQuestKey = async (
36
36
throw new Error(`quest key ${questKeyUpdate[0].ItemType} not found`);
37
37
}
38
38
39
delete questKeyUpdate[0].CompletionDate;
39
40
inventory.QuestKeys[questKeyIndex].overwrite(questKeyUpdate[0]);
40
41
41
42
const inventoryChanges: IInventoryChanges = {};