chore: build
This commit is contained in:
@@ -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++
|
||||
|
||||
Reference in New Issue
Block a user