Update clan.go

This commit is contained in:
Alicia 2019-02-25 21:13:50 +00:00
parent d7d592a2bd
commit 21d9cf3fae

View File

@ -89,8 +89,8 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
rows, err = md.DB.Query("SELECT id, name, description, icon FROM clans") rows, err = md.DB.Query("SELECT id, name, description, icon FROM clans")
if err != nil { if err != nil {
fmt.Println("lol")
md.Err(err) md.Err(err)
return Err500
} }
defer rows.Close() defer rows.Close()
for rows.Next() { for rows.Next() {
@ -103,6 +103,7 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
r.Clans = append(r.Clans, nc) r.Clans = append(r.Clans, nc)
} }
if err := rows.Err(); err != nil { if err := rows.Err(); err != nil {
fmt.Println("lol 2")
md.Err(err) md.Err(err)
} }
r.ResponseBase.Code = 200 r.ResponseBase.Code = 200
@ -110,6 +111,7 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
m, brr := strconv.ParseInt(string(md.Query("m")[19]), 10, 64) m, brr := strconv.ParseInt(string(md.Query("m")[19]), 10, 64)
if brr != nil { if brr != nil {
fmt.Println("lol 3")
fmt.Println(brr) fmt.Println(brr)
m = 0 m = 0
} }
@ -148,6 +150,7 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
`, rid) `, rid)
if err != nil { if err != nil {
fmt.Println("lol 4")
fmt.Println(err) fmt.Println(err)
} }