chore: build
This commit is contained in:
@@ -251,6 +251,13 @@ func (d *Database) UpdateSettings(s models.AppSettings) error {
|
||||
return fmt.Errorf("erreur sérialisation pools: %w", err)
|
||||
}
|
||||
|
||||
if s.PointsReward != nil {
|
||||
for i := range s.PointsReward.CategoryConfigs {
|
||||
if s.PointsReward.CategoryConfigs[i].Products == nil {
|
||||
s.PointsReward.CategoryConfigs[i].Products = []models.RewardProductQuantity{}
|
||||
}
|
||||
}
|
||||
}
|
||||
rewardJSON, err := json.Marshal(s.PointsReward)
|
||||
if err != nil {
|
||||
return fmt.Errorf("erreur sérialisation points_reward: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user