mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 13:54:01 +00:00
wip: black
This commit is contained in:
parent
dd5ec26c8c
commit
c4eacd0ccf
@ -40,7 +40,10 @@ if (amountInCents !== 20000) {
|
||||
}
|
||||
|
||||
const subscriptionData = await Billing.stripe().subscriptions.retrieve(subscription.id, { expand: ["discounts"] })
|
||||
const couponID = subscriptionData.discounts[0]?.coupon?.id
|
||||
const couponID =
|
||||
typeof subscriptionData.discounts[0] === "string"
|
||||
? subscriptionData.discounts[0]
|
||||
: subscriptionData.discounts[0]?.coupon?.id
|
||||
|
||||
// Check if subscription is already tied to another workspace
|
||||
const existingSubscription = await Database.use((tx) =>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user