chore: build

This commit is contained in:
2026-06-11 12:16:02 +02:00
parent 624f8a0e72
commit 9b50dca96c
3 changed files with 16 additions and 6 deletions
+7 -2
View File
@@ -238,6 +238,7 @@ func CreateProduct(c *gin.Context) {
for priceIndex < 100 { // Limite anti-spam
quantityKey := fmt.Sprintf("prices[%d][quantity]", priceIndex)
priceKey := fmt.Sprintf("prices[%d][price]", priceIndex)
activePriceKey := fmt.Sprintf("prices[%d][active_price]", priceIndex)
quantityStr := c.PostForm(quantityKey)
priceStr := c.PostForm(priceKey)
@@ -263,9 +264,13 @@ func CreateProduct(c *gin.Context) {
return
}
activePriceStr := c.PostForm(activePriceKey)
activePrice := activePriceStr != "false"
prices = append(prices, models.ProductPrice{
Quantity: quantity,
Price: price,
Quantity: quantity,
Price: price,
ActivePrice: activePrice,
})
priceIndex++