|
|
@@ -29,11 +29,11 @@ func GetUserGroups(c *gin.Context) {
|
|
|
userId := c.GetInt("id")
|
|
|
userGroup, _ = model.GetUserGroup(userId, false)
|
|
|
userUsableGroups := service.GetUserUsableGroups(userGroup)
|
|
|
- for groupName, ratio := range ratio_setting.GetGroupRatioCopy() {
|
|
|
+ for groupName, _ := range ratio_setting.GetGroupRatioCopy() {
|
|
|
// UserUsableGroups contains the groups that the user can use
|
|
|
if desc, ok := userUsableGroups[groupName]; ok {
|
|
|
usableGroups[groupName] = map[string]interface{}{
|
|
|
- "ratio": ratio,
|
|
|
+ "ratio": service.GetUserGroupRatio(userGroup, groupName),
|
|
|
"desc": desc,
|
|
|
}
|
|
|
}
|