Replase product skus with their full names.
Этот коммит содержится в:
@@ -7,7 +7,6 @@ import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"time"
|
||||
@@ -144,8 +143,7 @@ func changeSubscription(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
c.Logger.Error("Error finding the new cloud product", mlog.Err(err))
|
||||
}
|
||||
|
||||
starterSku := fmt.Sprintf("%s-%s", model.SubscriptionFamilyCloud, model.ProductSkuStarter)
|
||||
if product.SKU == starterSku {
|
||||
if product.SKU == string(model.SkuCloudStarter) {
|
||||
w.Write(json)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -43,9 +43,15 @@ const (
|
||||
type ProductSku string
|
||||
|
||||
const (
|
||||
ProductSkuStarter = ProductSku("starter")
|
||||
ProductSkuProfessional = ProductSku("professional")
|
||||
ProductSkuEnterprise = ProductSku("enterprise")
|
||||
SkuStarterGov = ProductSku("starter-gov")
|
||||
SkuProfessionalGov = ProductSku("professional-gov")
|
||||
SkuEnterpriseGov = ProductSku("enterprise-gov")
|
||||
SkuStarter = ProductSku("starter")
|
||||
SkuProfessional = ProductSku("professional")
|
||||
SkuEnterprise = ProductSku("enterprise")
|
||||
SkuCloudStarter = ProductSku("cloud-starter")
|
||||
SkuCloudProfessional = ProductSku("cloud-professional")
|
||||
SkuCloudEnterprise = ProductSku("cloud-enterprise")
|
||||
)
|
||||
|
||||
// Product model represents a product on the cloud system.
|
||||
|
||||
Ссылка в новой задаче
Block a user