fix: correct mistakes letters in word
This commit is contained in:
@@ -39,8 +39,8 @@ func AddToCart(c *gin.Context) {
|
|||||||
userID := getUserID(c)
|
userID := getUserID(c)
|
||||||
|
|
||||||
var req struct {
|
var req struct {
|
||||||
ItemID uint `json:"item_id" bindind:"required"`
|
ItemID uint `json:"item_id" binding:"required"`
|
||||||
Quantity float64 `json:"quantity" bindind:"required,gt=0"`
|
Quantity float64 `json:"quantity" binding:"required,gt=0"`
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := c.ShouldBindJSON(&req); err != nil {
|
if err := c.ShouldBindJSON(&req); err != nil {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export default function Shop() {
|
|||||||
try {
|
try {
|
||||||
await api.addToCart({
|
await api.addToCart({
|
||||||
item_id: product.id,
|
item_id: product.id,
|
||||||
quanity: selectedWeight,
|
quantity: selectedWeight,
|
||||||
});
|
});
|
||||||
alert(`${product.name} добавлен в корзину`);
|
alert(`${product.name} добавлен в корзину`);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user