diff --git a/src/controllers/custom/manageQuestsController.ts b/src/controllers/custom/manageQuestsController.ts index 82bd1645..edf1feae 100644 --- a/src/controllers/custom/manageQuestsController.ts +++ b/src/controllers/custom/manageQuestsController.ts @@ -14,7 +14,7 @@ export const manageQuestsController: RequestHandler = async (req, res) => { | "ResetAll" | "completeAllUnlocked" | "updateKey" - | "giveAllQuests"; + | "giveAll"; const questKeyUpdate = req.body as IUpdateQuestRequest["QuestKeys"]; const allQuestKeys: string[] = []; @@ -72,6 +72,7 @@ export const manageQuestsController: RequestHandler = async (req, res) => { for (const questKey of inventory.QuestKeys) { questKey.Completed = false; questKey.Progress = []; + questKey.CompletionDate = undefined; } inventory.ActiveQuest = ""; break; @@ -79,7 +80,6 @@ export const manageQuestsController: RequestHandler = async (req, res) => { case "completeAllUnlocked": { logger.info("completing all unlocked quests.."); for (const questKey of inventory.QuestKeys) { - console.log("size of questkeys", inventory.QuestKeys.length); try { await completeQuest(inventory, questKey.ItemType); } catch (error) { @@ -106,7 +106,7 @@ export const manageQuestsController: RequestHandler = async (req, res) => { inventory.ActiveQuest = ""; break; } - case "giveAllQuests": { + case "giveAll": { for (const questKey of allQuestKeys) { addQuestKey(inventory, { ItemType: questKey }); }