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