Przeglądaj źródła

Fix feature flag

Mauricio Araujo 2 lat temu
rodzic
commit
f5baea7f3f
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      api/server/handlers/project/create.go

+ 1 - 1
api/server/handlers/project/create.go

@@ -81,7 +81,7 @@ func (p *ProjectCreateHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
 	}
 	}
 
 
 	// Create Stripe Customer
 	// Create Stripe Customer
-	if p.Config().ServerConf.StripeSecretKey != "" && p.Config().ServerConf.StripePublishableKey != "" {
+	if p.Config().BillingManager.StripeEnabled && proj.GetFeatureFlag(models.BillingEnabled, p.Config().LaunchDarklyClient) {
 		// Create billing customer for project and set the billing ID
 		// Create billing customer for project and set the billing ID
 		billingID, err := p.Config().BillingManager.StripeClient.CreateCustomer(ctx, user.Email, proj.ID, proj.Name)
 		billingID, err := p.Config().BillingManager.StripeClient.CreateCustomer(ctx, user.Email, proj.ID, proj.Name)
 		if err != nil {
 		if err != nil {