Add level in /api/get_user
This commit is contained in:
parent
32b9d1e2d5
commit
a16c196799
|
@ -5,6 +5,7 @@ import (
|
|||
"database/sql"
|
||||
"fmt"
|
||||
|
||||
"git.zxq.co/ripple/ocl"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/thehowl/go-osuapi"
|
||||
)
|
||||
|
@ -46,6 +47,7 @@ func GetUser(c *gin.Context, db *sql.DB) {
|
|||
if !display {
|
||||
user.Country = "XX"
|
||||
}
|
||||
user.Level = ocl.GetLevelPrecise(user.TotalScore)
|
||||
|
||||
c.JSON(200, []osuapi.User{user})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user