The Open Source DocuSign Alternative.
TypeScript digital-signaturedocument-signingdocusign-alternativee-signatureesignesignaturenext-authnextjsopen-sourcepades-standardpdfpdf-signpdf-signaturepostgresqlprismaself-hostedsigningtypescript
feat: wip
David Nguyenf45cd81b5f23
diff --git a/apps/web/src/app/(dashboard)/settings/billing/create-billing-portal.action.ts b/apps/web/src/app/(dashboard)/settings/billing/create-billing-portal.action.tsindex f235cb846..d42d1e97e 100644--- a/apps/web/src/app/(dashboard)/settings/billing/create-billing-portal.action.ts+++ b/apps/web/src/app/(dashboard)/settings/billing/create-billing-portal.action.ts@@ -40,10 +40,10 @@ export const createBillingPortal = async () => {});}- const stripeCustomerSubsriptions = stripeCustomer.subscriptions?.data ?? [];+ const stripeCustomerSubscriptions = stripeCustomer.subscriptions?.data ?? [];// Create a free subscription for user if it does not exist.- if (!existingSubscription && stripeCustomerSubsriptions.length === 0) {+ if (!existingSubscription && stripeCustomerSubscriptions.length === 0) {const newSubscription = await stripe.subscriptions.create({customer: stripeCustomer.id,items: [diff --git a/apps/web/src/pages/api/stripe/webhook/index.ts b/apps/web/src/pages/api/stripe/webhook/index.tsindex 06f63e293..9f1a6937a 100644--- a/apps/web/src/pages/api/stripe/webhook/index.ts+++ b/apps/web/src/pages/api/stripe/webhook/index.ts@@ -212,7 +212,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)const handleCustomerSubscriptionUpdated = async (subscription: Stripe.Subscription) => {// eslint-disable-next-line @typescript-eslint/consistent-type-assertions- const plan = (subscription as unknown as Stripe.SubscriptionItem).plan;+ const { plan } = subscription as unknown as Stripe.SubscriptionItem;const customerId =typeof subscription.customer === 'string' ? subscription.customer : subscription.customer.id;