Skip to content

Commit

Permalink
remove console.logs
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonnorsworthy committed Sep 23, 2024
1 parent fc3be25 commit 634ed25
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions services/category.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 0 additions & 4 deletions services/quest.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,15 @@ export default {
async getRandomQuest(userId: number): Promise<Quest | null> {
// 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 = `
Expand Down

0 comments on commit 634ed25

Please sign in to comment.