We shall never forget about #ilbagdellennepì

add support for taiko pp
This commit is contained in:
Morgan Bazalgette 2017-09-18 21:38:33 +02:00
parent 77093ebef7
commit 6dde2086ac
No known key found for this signature in database
GPG Key ID: 40D328300D245DA5
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ func genmodei(m string) int {
}
func rankable(m string) bool {
x := genmodei(m)
return x == 0 || x == 3
return x != 2
}
func genUser(c *fasthttp.RequestCtx, db *sqlx.DB) (string, string) {

View File

@ -46,8 +46,8 @@ func UserScoresBestGET(md common.MethodData) common.CodeMessager {
return *cm
}
mc := genModeClause(md)
// Do not print 0pp scores on std
if getMode(md.Query("mode")) == "std" {
// For all modes that have PP, we leave out 0 PP scores.
if getMode(md.Query("mode")) != "ctb" {
mc += " AND scores.pp > 0"
}
return scoresPuts(md, fmt.Sprintf(