mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-05 22:03:42 +08:00
fix: pricing page group ratio (close #275)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user