From 42e5ed68fe436deb7f183fd549b3c0e95c578c2e Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Sun, 27 Nov 2022 01:18:24 +0000 Subject: [PATCH] fix: absolutely untrue assertions multiple people can be subscribed to a goal or chart you dunce --- server/src/utils/db.ts | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/server/src/utils/db.ts b/server/src/utils/db.ts index 92127dab8..ec9388a3d 100644 --- a/server/src/utils/db.ts +++ b/server/src/utils/db.ts @@ -196,14 +196,6 @@ export async function GetRecentlyAchievedGoals( goalID: { $in: goalSubs.map((e) => e.goalID) }, }); - if (goals.length !== goalSubs.length) { - logger.error( - `Found ${goals.length} goals when looking for parents of ${goalSubs.length} subscriptions. This mismatch implies a state desync.` - ); - - throw new Error("Failed to fetch goals."); - } - return { goals, goalSubs }; } @@ -236,14 +228,6 @@ export async function GetRecentlyInteractedGoals( goalID: { $in: goalSubs.map((e) => e.goalID) }, }); - if (goals.length !== goalSubs.length) { - logger.error( - `Found ${goals.length} goals when looking for parents of ${goalSubs.length} subscriptions. This mismatch implies a state desync.` - ); - - throw new Error("Failed to fetch goals."); - } - return { goals, goalSubs }; } @@ -275,14 +259,6 @@ export async function GetRecentlyAchievedQuests( questID: { $in: questSubs.map((e) => e.questID) }, }); - if (quests.length !== questSubs.length) { - logger.error( - `Found ${quests.length} quests when looking for parents of ${questSubs.length} subscriptions. This mismatch implies a state desync.` - ); - - throw new Error("Failed to fetch quests."); - } - return { quests, questSubs }; } @@ -315,14 +291,6 @@ export async function GetRecentlyInteractedQuests( questID: { $in: questSubs.map((e) => e.questID) }, }); - if (quests.length !== questSubs.length) { - logger.error( - `Found ${quests.length} quests when looking for parents of ${questSubs.length} subscriptions. This mismatch implies a state desync.` - ); - - throw new Error("Failed to fetch quests."); - } - return { quests, questSubs }; }