fix: use subscription Id to fetch the current active subscription from stripe (#1770)

This commit is contained in:
许永恒
2025-03-12 22:12:38 +03:00
committed by GitHub
parent 384d842ec1
commit ace8f8a3d7
+1 -1
View File
@@ -240,7 +240,7 @@ export const stripe = <O extends StripeOptions>(options: O) => {
customer: customerId,
status: "active",
})
.then((res) => res.data[0])
.then((res) => res.data.find(subscription => subscription.id === ctx.body.subscriptionId))
.catch((e) => null)
: null;