switched to unix time
This commit is contained in:
8
main.go
8
main.go
@@ -181,7 +181,7 @@ func getPlayer(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
if !tPlayer.VacDate.IsZero() {
|
||||
response.VACDate = &tPlayer.VacDate
|
||||
response.VACDate = tPlayer.VacDate.Unix()
|
||||
}
|
||||
|
||||
var tMatches []*ent.Match
|
||||
@@ -247,7 +247,7 @@ func getPlayer(w http.ResponseWriter, r *http.Request) {
|
||||
mResponse := &utils.MatchResponse{
|
||||
MatchId: iMatch.ID,
|
||||
Map: iMatch.Map,
|
||||
Date: iMatch.Date,
|
||||
Date: iMatch.Date.Unix(),
|
||||
Score: [2]int{iMatch.ScoreTeamA, iMatch.ScoreTeamB},
|
||||
Duration: iMatch.Duration,
|
||||
MatchResult: iMatch.MatchResult,
|
||||
@@ -592,7 +592,7 @@ func getMatch(w http.ResponseWriter, r *http.Request) {
|
||||
MatchId: tMatch.ID,
|
||||
ShareCode: tMatch.ShareCode,
|
||||
Map: tMatch.Map,
|
||||
Date: tMatch.Date,
|
||||
Date: tMatch.Date.Unix(),
|
||||
Score: [2]int{tMatch.ScoreTeamA, tMatch.ScoreTeamB},
|
||||
Duration: tMatch.Duration,
|
||||
MatchResult: tMatch.MatchResult,
|
||||
@@ -664,7 +664,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.Unix()
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user