fix: absolutely untrue assertions

multiple people can be subscribed to a goal or chart you dunce
This commit is contained in:
zkldi
2022-11-27 01:18:24 +00:00
parent 6bb822b3e5
commit 42e5ed68fe
-32
View File
@@ -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 };
}