chore: build
Backend - Build & Lint / build (push) Failing after 28m23s

This commit is contained in:
Nuxgrid
2026-07-12 15:20:53 +02:00
parent 2919bca86d
commit 4de42cff57
40 changed files with 2539 additions and 796 deletions
-7
View File
@@ -791,13 +791,6 @@ func (d *Database) ClaimPoolReward(username, poolKey string, threshold int) (rem
return remainingAvailable, nil
}
// ClaimPoolRewardAndAddToBasket réclame une récompense ET ajoute les articles
// récompense au panier dans une seule transaction : si les articles ne
// peuvent pas être ajoutés (produit supprimé/inexistant configuré par
// l'admin), toute l'opération est annulée — la récompense n'est pas
// consommée. Corrige un bug où ClaimPoolReward et AddRewardsToBasket,
// appelés séparément, pouvaient consommer une récompense sans livrer aucun
// produit au client si l'ajout au panier échouait après coup.
func (d *Database) ClaimPoolRewardAndAddToBasket(username, poolKey string, threshold int, items []models.RewardItem) (remainingAvailable int, added []models.Panier, err error) {
err = d.GDB.Transaction(func(tx *gorm.DB) error {
var err error