2
0

🐛 (billing) Only fetch active subscriptions

This commit is contained in:
Baptiste Arnaud
2023-05-05 11:02:59 -04:00
parent 8b3a690809
commit 98a21f3a9e
3 changed files with 5 additions and 0 deletions

View File

@@ -49,6 +49,7 @@ export const getSubscription = authenticatedProcedure
const subscriptions = await stripe.subscriptions.list({
customer: workspace.stripeId,
limit: 1,
status: 'active',
})
const subscription = subscriptions?.data.shift()