Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update utils.ts

Kiran K77ed7f4cc134
diff --git a/apps/web/app/(ee)/api/stripe/webhook/utils.ts b/apps/web/app/(ee)/api/stripe/webhook/utils.ts
index 4fd8cff04a..6158ee70cf 100644
--- a/apps/web/app/(ee)/api/stripe/webhook/utils.ts
+++ b/apps/web/app/(ee)/api/stripe/webhook/utils.ts
@@ -67,7 +67,8 @@ export async function updateWorkspacePlan({
const newPlanName = plan.name.toLowerCase();
const shouldDisableWebhooks = newPlanName === "free" || newPlanName === "pro";
- const shouldDeleteFolders = newPlanName === "free" && plan.limits.folders > 0;
+ const shouldDeleteFolders =
+ newPlanName === "free" && workspace.foldersUsage > 0;
// If a workspace upgrades/downgrades their subscription
// or if the payouts limit changes and the new plan is not a legacy plan