From ec1bc3b2f7024b0db51dc62313554b8ce6ec129f Mon Sep 17 00:00:00 2001 From: itzaname Date: Sun, 6 Jul 2025 20:46:31 -0400 Subject: [PATCH] Use string instead of int64 to support garbage languages --- pkg/api/dto/times.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/api/dto/times.go b/pkg/api/dto/times.go index 9d34285..d589f3b 100644 --- a/pkg/api/dto/times.go +++ b/pkg/api/dto/times.go @@ -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