From a16c196799a65f0ed03edc970e5c3851f67f57e0 Mon Sep 17 00:00:00 2001 From: Howl Date: Tue, 17 May 2016 17:00:09 +0200 Subject: [PATCH] Add level in /api/get_user --- app/peppy/user.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/peppy/user.go b/app/peppy/user.go index aea97ea..8c20391 100644 --- a/app/peppy/user.go +++ b/app/peppy/user.go @@ -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}) }