This commit is contained in:
Alicia 2019-02-23 16:25:53 +00:00
parent ec0445cec8
commit 3b928ef6d9

View File

@ -94,7 +94,7 @@ func registerSubmit(c *gin.Context) {
return return
} }
if db.QueryRow("SELECT 1 FROM beta_keys WHERE key_md5 = ? AND allowed = 1", 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 { Scan(new(int)) != sql.ErrNoRows {
fmt.Println(db.QueryRow("SELECT 1 FROM beta_keys WHERE key_md5 = ? AND allowed = 1", cmd5(c.PostForm("key")))) fmt.Println(db.QueryRow("SELECT 1 FROM beta_keys WHERE key_md5 = ? AND allowed = 1", cmd5(c.PostForm("key"))))
registerResp(c, errorMessage{T(c, "Invalid Beta Key.")}) registerResp(c, errorMessage{T(c, "Invalid Beta Key.")})