diff --git a/api/user.go b/api/user.go index ac73996..bebaa41 100644 --- a/api/user.go +++ b/api/user.go @@ -209,14 +209,14 @@ func GetAllUserInfo(c *gin.Context) { var alla []PublicAllInfoResponse Link() DB := db.DBsnctf - rows, err := DB.Debug().Select([]string{"id", "username", "affiliation", "country", "website", "hidden"}).Table("user").Rows() + rows, err := DB.Debug().Select([]string{"id", "username", "affiliation", "country", "website"}).Table("user").Where("hidden = ?", 0).Rows() if err != nil { c.JSON(400, gin.H{"code": 400, "msg": "Get info error!"}) return } for rows.Next() { - rows.Scan(&info.Id, &info.Username, &info.Affiliation, &info.Country, &info.Website, &info.Hidden) + rows.Scan(&info.Id, &info.Username, &info.Affiliation, &info.Country, &info.Website) alla = append(alla, info) } c.JSON(200, gin.H{"code": 200, "data": alla})