This commit is contained in:
rxdn 2020-10-27 22:21:12 +00:00
parent e708bfa3d4
commit 9ea8b8823b
2 changed files with 23 additions and 1 deletions

View File

@ -78,3 +78,25 @@ func GetGuilds(ctx *gin.Context) {
ctx.JSON(200, adminGuilds)
}
/*func getAdminGuilds(userId uint64) ([]uint64, error) {
var guilds []uint64
// get guilds owned by user
query := `SELECT "guild_id" FROM guilds WHERE "data"->'owner_id' = '$1';`
rows, err := cache.Instance.Query(context.Background(), query, userId)
if err != nil {
return nil, err
}
for rows.Next() {
var guildId uint64
if err := rows.Scan(&guildId); err != nil {
return nil, err
}
guilds = append(guilds, guildId)
}
database.Client.Permissions.GetSupport()
}*/

2
go.mod
View File

@ -23,7 +23,7 @@ require (
github.com/klauspost/compress v1.10.10 // indirect
github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c
github.com/pkg/errors v0.9.1
github.com/rxdn/gdl v0.0.0-20200925123042-8f6710be7d00
github.com/rxdn/gdl v0.0.0-20201027221415-e420474288d4
github.com/sirupsen/logrus v1.5.0
github.com/ulule/limiter/v3 v3.5.0
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a