Browse Source

move maxlimit in billing spec

Alexander Belanger 4 năm trước cách đây
mục cha
commit
65528ce7d9
2 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 1
      ee/billing/ironplans.go
  2. 0 1
      ee/billing/types.go

+ 1 - 1
ee/billing/ironplans.go

@@ -430,7 +430,7 @@ func (c *Client) ParseProjectUsageFromWebhook(payload []byte) (*cemodels.Project
 
 	for _, feature := range subscription.Plan.Features {
 		// look for slug of "cpus" and "memory"
-		maxLimit := uint(feature.MaxLimit)
+		maxLimit := uint(feature.FeatureSpec.MaxLimit)
 		switch feature.Feature.Slug {
 		case FeatureSlugCPU:
 			usage.ResourceCPU = maxLimit

+ 0 - 1
ee/billing/types.go

@@ -47,7 +47,6 @@ type PlanFeature struct {
 	IsActive    bool        `json:"is_active"`
 	Feature     Feature     `json:"feature"`
 	FeatureSpec FeatureSpec `json:"spec"`
-	MaxLimit    int64       `json:"max_limit"`
 }
 
 type Feature struct {