Skip to content

Commit

Permalink
[raffle] Fix: Send ID as string
Browse files Browse the repository at this point in the history
in order to be able to transport big uint64 through JSON

Signed-off-by: Knut Ahlers <knut@ahlers.me>
  • Loading branch information
Luzifer committed Aug 10, 2024
1 parent 4964ed2 commit e8d60e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/apimodules/raffle/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type (
}

raffle struct {
ID uint64 `gorm:"primaryKey" json:"id"`
ID uint64 `gorm:"primaryKey" json:"id,string"`

Channel string `json:"channel"`
Keyword string `json:"keyword"`
Expand Down Expand Up @@ -67,7 +67,7 @@ type (
}

raffleEntry struct {
ID uint64 `gorm:"primaryKey" json:"id"`
ID uint64 `gorm:"primaryKey" json:"id,string"`
RaffleID uint64 `gorm:"uniqueIndex:user_per_raffle" json:"-"`

UserID string `gorm:"size:128;uniqueIndex:user_per_raffle" json:"userID"`
Expand Down

0 comments on commit e8d60e2

Please sign in to comment.