From 3d40e03639001355e4b568c5f3fac1fc4f5d156c Mon Sep 17 00:00:00 2001 From: Alicia Date: Sat, 23 Feb 2019 16:39:00 +0000 Subject: [PATCH] Update register.go --- register.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/register.go b/register.go index 72892c1..551405c 100644 --- a/register.go +++ b/register.go @@ -96,7 +96,11 @@ func registerSubmit(c *gin.Context) { errr := db.QueryRow("SELECT 1 FROM beta_keys WHERE key_md5 = ? AND allowed = 1", cmd5(c.PostForm("key"))) fmt.Printf("%v", errr) - if errr == nil { + i = 0 + for errr.Next() { + i++ + } + if errr == 0 { registerResp(c, errorMessage{T(c, "Invalid Beta Key.")}) return }