Revert "Normalise floats (don't use Inf in JSON)"
This reverts commit 330757ec78
.
This commit is contained in:
@@ -4,7 +4,6 @@ package peppy
|
||||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"git.zxq.co/ripple/ocl"
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -50,12 +49,5 @@ func GetUser(c *gin.Context, db *sql.DB) {
|
||||
}
|
||||
user.Level = ocl.GetLevelPrecise(user.TotalScore)
|
||||
|
||||
if math.IsInf(user.Accuracy, 0) {
|
||||
user.Accuracy = 0
|
||||
}
|
||||
if math.IsInf(user.Level, 0) {
|
||||
user.Level = 0
|
||||
}
|
||||
|
||||
c.JSON(200, []osuapi.User{user})
|
||||
}
|
||||
|
Reference in New Issue
Block a user