mirror of
https://github.com/FromGram/server.git
synced 2026-11-19 05:51:37 +03:00
fix: convert Unix() int64 to int for StarGiftPurchaseForm.IssuedAt/ExpiresAt
domain.StarGiftPurchaseForm.IssuedAt and .ExpiresAt are int, not int64 -- time.Time.Unix() returns int64, so the struct literal in GrantStarGift needed explicit int(...) conversions.
This commit is contained in:
@@ -698,8 +698,8 @@ func (s *Service) GrantStarGift(ctx context.Context, req GrantStarGiftRequest) (
|
||||
HideName: req.HideName,
|
||||
Message: req.Message,
|
||||
ChargeStars: gift.Stars,
|
||||
IssuedAt: now.Unix(),
|
||||
ExpiresAt: now.Unix() + 600,
|
||||
IssuedAt: int(now.Unix()),
|
||||
ExpiresAt: int(now.Unix() + 600),
|
||||
}
|
||||
issued, err := s.gifts.IssuePurchaseForm(ctx, form)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user