Merge branch 'main' into feat/public-api

This commit is contained in:
Catalin Pit
2023-12-11 14:44:29 +02:00
committed by GitHub
61 changed files with 1004 additions and 411 deletions

View File

@ -23,7 +23,7 @@ export const createCheckout = async ({ priceId }: CreateCheckoutOptions) => {
let stripeCustomer: Stripe.Customer | null = null;
// Find the Stripe customer for the current user subscription.
if (existingSubscription) {
if (existingSubscription?.periodEnd && existingSubscription.periodEnd >= new Date()) {
stripeCustomer = await getStripeCustomerById(existingSubscription.customerId);
if (!stripeCustomer) {