chore: build
Backend - Build & Lint / build (push) Failing after 16m17s

This commit is contained in:
Nuxgrid
2026-07-08 21:54:00 +02:00
parent 5cd8ada828
commit 12a7facc45
19 changed files with 93 additions and 611 deletions
-12
View File
@@ -57,18 +57,6 @@ type basketItem struct {
RewardPoolKey string `gorm:"column:reward_pool_key"`
}
func (d *Database) fetchBasketItems(username string) ([]basketItem, float64, error) {
var items []basketItem
if err := d.GDB.Table("baskets").Select("product_id, quantity, price, is_reward, reward_pool_key").Where("username = ?", username).Scan(&items).Error; err != nil {
return nil, 0, fmt.Errorf("erreur récupération panier: %w", err)
}
total := 0.0
for _, item := range items {
total += item.Price
}
return items, total, nil
}
// validateCommandStatus vérifie si le statut est valide
func validateCommandStatus(status string) error {
validStatuses := map[string]bool{