Use string instead of int64 to support garbage languages #16

Merged
itzaname merged 1 commits from staging into master 2025-07-07 00:53:59 +00:00

View File

@@ -2,6 +2,7 @@ package dto
import (
"git.itzana.me/strafesnet/go-grpc/times"
"strconv"
"time"
)
@@ -13,7 +14,7 @@ type TimeFilter struct {
GameID *int32 `json:"game_id" form:"game_id"`
} // @TimeFilter
type TimeData struct {
ID int64 `json:"id"`
ID string `json:"id"`
Time int64 `json:"time"`
User User `json:"user"`
Map Map `json:"map"`
@@ -30,7 +31,7 @@ func (t *TimeData) FromGRPC(resp *times.TimeResponse) *TimeData {
return nil
}
t.ID = resp.ID
t.ID = strconv.FormatInt(resp.ID, 10)
t.Time = resp.Time
t.Date = time.Unix(resp.Date, 0)
t.StyleID = resp.StyleID