This commit is contained in:
Alicia 2019-02-23 16:42:39 +00:00
parent 42fc404384
commit 786b9adc22
1 changed files with 2 additions and 5 deletions

View File

@ -96,11 +96,8 @@ func registerSubmit(c *gin.Context) {
errr := db.QueryRow("SELECT id FROM beta_keys WHERE key_md5 = ? AND allowed = 1", cmd5(c.PostForm("key")))
fmt.Printf("%v", errr)
for errr.Next() {
i++
}
if i == 0 {
registerResp(c, errorMessage{T(c, "Invalid Beta Key.")})
if err.Scan(new(int)) == sql.ErrNoRows {
registerResp(c, errorMessage{T(c, "key bad.")})
return
}