API: Allow more advanced group filtering

This commit is contained in:
mkwcat
2024-01-05 19:00:09 -05:00
parent 3337d7fc0d
commit fbde8963db
3 changed files with 8 additions and 5 deletions

View File

@@ -24,8 +24,7 @@ func HandleGroups(w http.ResponseWriter, r *http.Request) {
return
}
gameName := query.Get("game")
groups := qr2.GetGroups(gameName)
groups := qr2.GetGroups(query["game"], query["id"])
for _, group := range groups {
for i, player := range group.Players {

View File

@@ -35,7 +35,7 @@ func HandleStats(w http.ResponseWriter, r *http.Request) {
stats := map[string]Stats{}
servers := qr2.GetSessionServers()
groups := qr2.GetGroups("")
groups := qr2.GetGroups([]string{}, []string{})
globalStats := Stats{
OnlinePlayerCount: len(servers),