added replay url te matchResponse

This commit is contained in:
2021-10-22 21:22:02 +02:00
parent c6bbc31188
commit 6bbe6c5732
2 changed files with 5 additions and 0 deletions

View File

@@ -601,6 +601,10 @@ func getMatch(w http.ResponseWriter, r *http.Request) {
Stats: []*utils.StatsResponse{},
}
if tMatch.Date.Before(time.Now().AddDate(0, 0, -30)) {
mResponse.ReplayURL = tMatch.ReplayURL
}
db.Lock.RLock()
tStats, err := tMatch.QueryStats().WithPlayers().All(context.Background())
db.Lock.RUnlock()

View File

@@ -157,6 +157,7 @@ type MatchResponse struct {
MatchResult int `json:"match_result"`
MaxRounds int `json:"max_rounds,omitempty"`
Parsed bool `json:"parsed"`
ReplayURL string `json:"replay_url,omitempty"`
Stats interface{} `json:"stats,omitempty"`
}