From 4ac1bb7cca8109b7f28d526fa67b8b25009816d8 Mon Sep 17 00:00:00 2001 From: ggmolly Date: Tue, 16 Apr 2024 00:07:15 +0200 Subject: [PATCH] fix: typo in shop offer deserialization --- misc/update_data.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/misc/update_data.go b/misc/update_data.go index 9a99f55..79989ef 100644 --- a/misc/update_data.go +++ b/misc/update_data.go @@ -223,18 +223,16 @@ func importShopOffers(region string, tx *gorm.DB) error { for decoder.More() { var offer struct { // decoding to json via a pq.Int64Array is not supported, so we need to decode the effects manually orm.ShopOffer - Effects_ []uint32 `json:"effects" gorm:"-"` + Effects_ []uint32 `json:"effect_args" gorm:"-"` } if err := decoder.Decode(&offer); err != nil { return err } - // Manually convert the effects to pq.Int64Array offer.ShopOffer.Effects = make([]int64, len(offer.Effects_)) for i, effect := range offer.Effects_ { offer.ShopOffer.Effects[i] = int64(effect) } - shopOffer := orm.ShopOffer{ ID: offer.ID, Effects: offer.Effects,