added replay url te matchResponse
This commit is contained in:
4
main.go
4
main.go
@@ -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()
|
||||
|
@@ -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"`
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user