[FEATURE] Detailed stats about player weapon usage and hitgroups #1

Merged
anonfunc merged 7 commits from feature-more-detailed-stats into master 2021-10-16 01:49:52 +02:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 6be155bc96 - Show all commits

View File

@@ -144,7 +144,7 @@ func getPlayer(w http.ResponseWriter, r *http.Request) {
}
if !tPlayer.VacDate.IsZero() {
response.VACDate = tPlayer.VacDate
response.VACDate = &tPlayer.VacDate
}
db.Lock.RLock()
@@ -508,7 +508,7 @@ func getMatch(w http.ResponseWriter, r *http.Request) {
if !iStats.Edges.Players.VacDate.IsZero() {
switch s := sResponse.Player.(type) {
case utils.PlayerResponse:
s.VACDate = iStats.Edges.Players.VacDate
s.VACDate = &iStats.Edges.Players.VacDate
}
}

View File

@@ -155,7 +155,7 @@ type PlayerResponse struct {
Name string `json:"name"`
Avatar string `json:"avatar"`
VAC bool `json:"vac"`
VACDate time.Time `json:"vac_date,omitempty"`
VACDate *time.Time `json:"vac_date,omitempty"`
Tracked bool `json:"tracked"`
VanityURL string `json:"vanity_url,omitempty"`
MatchStats MatchStats `json:"match_stats,omitempty"`