Update clan.go
This commit is contained in:
parent
2b02e0eaea
commit
e5b83bb11c
|
@ -86,7 +86,7 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
|
|||
rows *sql.Rows
|
||||
err error
|
||||
)
|
||||
rows, err = md.DB.Query("SELECT id, name, description, icon FROM clans")
|
||||
rows, err = md.DB.Query("SELECT id, name, description, tag, icon FROM clans")
|
||||
|
||||
if err != nil {
|
||||
md.Err(err)
|
||||
|
@ -95,7 +95,9 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
|
|||
defer rows.Close()
|
||||
for rows.Next() {
|
||||
nc := clanLbSingle{}
|
||||
err = rows.Scan(&nc.ID, &nc.Name, &nc.Description, &nc.Icon)
|
||||
err = rows.Scan(&nc.ID, &nc.Name, &nc.Description, &nc.Tag, &nc.Icon)
|
||||
fmt.Println(rows)
|
||||
fmt.Println(&nc.Tag)
|
||||
if err != nil {
|
||||
md.Err(err)
|
||||
}
|
||||
|
@ -125,7 +127,6 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
|
|||
}
|
||||
fmt.Println(n)
|
||||
|
||||
|
||||
for i := 0; i < len(r.Clans); i++ {
|
||||
var members clanMembersData
|
||||
|
||||
|
@ -190,7 +191,7 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
|
|||
})
|
||||
|
||||
for i := 0; i < len(r.Clans); i++ {
|
||||
r.Clans[i].Rank = i+1
|
||||
r.Clans[i].Rank = i + 1
|
||||
}
|
||||
|
||||
return r
|
||||
|
@ -198,6 +199,7 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
|
|||
|
||||
|
||||
|
||||
|
||||
func TotalClanStatsGET(md common.MethodData) common.CodeMessager {
|
||||
var (
|
||||
r megaStats
|
||||
|
|
Loading…
Reference in New Issue
Block a user