Skip to content

Commit

Permalink
Yes
Browse files Browse the repository at this point in the history
  • Loading branch information
MineGame159 committed Jan 9, 2025
1 parent c6ed103 commit e53c591
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/web/api/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ type Stats struct {
OnlinePlayers int `json:"onlinePlayers"`

Builds map[string]int `json:"builds"`

// For compatibility with old Meteor versions that check this field without a safety check
Version string `json:"version"`
}

var builds map[string]int
Expand Down Expand Up @@ -53,6 +56,7 @@ func StatsHandler(w http.ResponseWriter, r *http.Request) {
Downloads: g.Downloads,
OnlinePlayers: GetPlayingCount(),
Builds: builds,
Version: "0.0.0",
})
} else {
stats, err := db.GetJoinStats(date)
Expand Down

0 comments on commit e53c591

Please sign in to comment.