delete suggestions if vouched

This commit is contained in:
Kalle (Sendou)
2021-03-22 21:01:00 +02:00
parent d55aa397f8
commit 7721ffa5ce

View File

@@ -428,6 +428,9 @@ const addVouch = async ({
where: { userId },
data: { canVouchFor: null },
}),
prisma.plusSuggestion.deleteMany({
where: { suggestedId: input.vouchedId, tier: input.tier },
}),
]);
function vouchedUserAlreadyHasAccess() {