chore: update

This commit is contained in:
2026-05-19 18:54:36 +02:00
parent c71b596400
commit 929dea7249
6 changed files with 34 additions and 14 deletions
+5
View File
@@ -51,6 +51,11 @@ func AddProductsBasket(c *gin.Context) {
return
}
if p, err := database.GetProductByID(req.ProductID); err == nil && p.ComingSoon {
c.JSON(http.StatusBadRequest, gin.H{"error": "Ce produit n'est pas encore disponible"})
return
}
panier, err := database.AddToBasket(req.Username, req.ProductID, req.Quantity)
if err != nil {
log.Printf("❌ [ADD_PANIER] product_id=%d qty=%.3f: %v", req.ProductID, req.Quantity, err)