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