API: Add join order and local player count

This commit is contained in:
mkwcat
2024-01-01 22:59:03 -05:00
parent 61d3176e11
commit 4e8ad85020
7 changed files with 227 additions and 138 deletions

View File

@@ -24,13 +24,14 @@ func HandleGroups(w http.ResponseWriter, r *http.Request) {
return
}
gameName := query.Get("gamename")
gameName := query.Get("game")
groups := qr2.GetGroups(gameName)
for _, group := range groups {
for i, player := range group.Players {
filtered := map[string]string{}
filtered["count"] = player["+localplayers"]
filtered["pid"] = player["dwc_pid"]
filtered["name"] = player["+ingamesn"]