From 6dde2086ac958e5641e0386fefa361bb751a8bf8 Mon Sep 17 00:00:00 2001 From: Morgan Bazalgette Date: Mon, 18 Sep 2017 21:38:33 +0200 Subject: [PATCH] =?UTF-8?q?We=20shall=20never=20forget=20about=20#ilbagdel?= =?UTF-8?q?lennep=C3=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add support for taiko pp --- app/peppy/common.go | 2 +- app/v1/user_scores.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/peppy/common.go b/app/peppy/common.go index 113e6ec..3c6cfb1 100644 --- a/app/peppy/common.go +++ b/app/peppy/common.go @@ -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) { diff --git a/app/v1/user_scores.go b/app/v1/user_scores.go index a811862..7c1e7a0 100644 --- a/app/v1/user_scores.go +++ b/app/v1/user_scores.go @@ -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(