Level on chosen_mode in leaderboard

This commit is contained in:
Howl 2016-09-28 20:49:58 +02:00
parent 90b7d71062
commit d6aa0a814d

View File

@ -3,6 +3,7 @@ package v1
import ( import (
"fmt" "fmt"
"git.zxq.co/ripple/ocl"
"git.zxq.co/ripple/rippleapi/common" "git.zxq.co/ripple/rippleapi/common"
) )
@ -61,6 +62,7 @@ func LeaderboardGET(md common.MethodData) common.CodeMessager {
md.Err(err) md.Err(err)
continue continue
} }
u.ChosenMode.Level = ocl.GetLevelPrecise(int64(u.ChosenMode.TotalScore))
resp.Users = append(resp.Users, u) resp.Users = append(resp.Users, u)
} }
resp.Code = 200 resp.Code = 200