mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-17 16:06:38 +08:00
fix: pricing page group ratio (close #275)
This commit is contained in:
parent
f07ae8139b
commit
3cd25c7e53
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user