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.

include past_due status

Steven Tey92d6115c5a9b
diff --git a/apps/web/app/api/workspaces/[idOrSlug]/billing/cancel/route.ts b/apps/web/app/api/workspaces/[idOrSlug]/billing/cancel/route.ts
index 910678e051..b49e0058c8 100644
--- a/apps/web/app/api/workspaces/[idOrSlug]/billing/cancel/route.ts
+++ b/apps/web/app/api/workspaces/[idOrSlug]/billing/cancel/route.ts
@@ -31,12 +31,15 @@ export const POST = withWorkspace(
limit: 10,
});
const subscription = data.find(
- (s) => s.status === "active" || s.status === "trialing",
+ (s) =>
+ s.status === "active" ||
+ s.status === "trialing" ||
+ s.status === "past_due",
);
if (!subscription) {
throw new DubApiError({
code: "not_found",
- message: "No active or trialing subscription found.",
+ message: "No valid subscription to cancel.",
});
}