From f21be9641d81aea893b8fe85246184a3499cc08a Mon Sep 17 00:00:00 2001 From: Alicia Date: Sat, 23 Feb 2019 16:32:34 +0000 Subject: [PATCH] zx --- register.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/register.go b/register.go index 0cc1e21..04e6462 100644 --- a/register.go +++ b/register.go @@ -94,8 +94,7 @@ func registerSubmit(c *gin.Context) { return } fmt.Printf("%s", cmd5(c.PostForm("key"))) - if db.QueryRow("SELECT 1 FROM beta_keys WHERE key_md5 = ? AND allowed = 1", cmd5(c.PostForm("key"))). - Scan(new(int)) != sql.ErrNoRows { + if db.QueryRow("SELECT 1 FROM beta_keys WHERE key_md5 = ? AND allowed = 1", cmd5(c.PostForm("key"))) == sql.ErrNoRows { registerResp(c, errorMessage{T(c, "Invalid Beta Key.")}) return }