Commit a4dd05a2 by 1808837298@qq.com

fix: pricing page group ratio (close #275)

parent f3c240d6
......@@ -203,9 +203,10 @@ func RetrieveModel(c *gin.Context) {
func GetPricing(c *gin.Context) {
userId := c.GetInt("id")
group, err := model.CacheGetUserGroup(userId)
// if no login, get default group ratio
groupRatio := common.GetGroupRatio("default")
if err != nil {
group, err := model.CacheGetUserGroup(userId)
if err == nil {
groupRatio = common.GetGroupRatio(group)
}
pricing := model.GetPricing(group)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment