Fix type error

This commit is contained in:
Joe Au-Yeung 2022-10-24 15:17:59 -04:00
parent ec5769abb2
commit 51e127f293

View File

@ -57,12 +57,7 @@ export const deleteTeamFromStripe = async (teamId: number) => {
select: { stripeCustomerId: true },
});
if (!stripeCustomerId) {
throw new Error("Team not found");
return;
}
if (stripeCustomerId) {
if (stripeCustomerId?.stripeCustomerId) {
await stripe.customers.del(stripeCustomerId.stripeCustomerId);
return;
} else {