From 634ed25ebab41d050e5b5caacb18afaf18b95a86 Mon Sep 17 00:00:00 2001 From: Brandon Norsworthy Date: Sun, 22 Sep 2024 21:32:30 -0500 Subject: [PATCH] remove console.logs --- services/category.service.ts | 3 --- services/quest.service.ts | 4 ---- 2 files changed, 7 deletions(-) diff --git a/services/category.service.ts b/services/category.service.ts index ab1f227..5a56fb7 100644 --- a/services/category.service.ts +++ b/services/category.service.ts @@ -36,9 +36,6 @@ export default { const randomRoll = Math.random() * totalWeight; let currentWeight = 0; - console.log("totalWeight", totalWeight); - console.log("randomRoll", randomRoll); - for (const category of categories) { currentWeight += category.weight; if (randomRoll <= currentWeight) { diff --git a/services/quest.service.ts b/services/quest.service.ts index 2135798..2f0ad14 100644 --- a/services/quest.service.ts +++ b/services/quest.service.ts @@ -94,19 +94,15 @@ export default { async getRandomQuest(userId: number): Promise { // 1. Fetch user preferences const { categoryFilters, completedQuests } = await userService.getUserPreferences(userId); - console.log("1", categoryFilters, completedQuests); // 2. Fetch available categories based on user filters const availableCategories = await categoryService.getAvailableCategories(userId, categoryFilters); - if (!availableCategories.length) { return null; } - console.log("2b", availableCategories); // 3. Select a random category const selectedCategory = categoryService.selectRandomCategory(availableCategories); - console.log("3", selectedCategory); // 4. Fetch a random quest from the selected category that the user has not completed const questQuery = `