orderiom-api-package
Advanced tools
Comparing version 0.3.13 to 0.3.14
{ | ||
"name": "orderiom-api-package", | ||
"version": "0.3.13", | ||
"version": "0.3.14", | ||
"description": "This package will install all necessary API calls for every orderiom restaurant", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -164,6 +164,9 @@ import axios from "axios"; | ||
if(basketProduct) basketProduct.changingQuantity = true; | ||
data.quantity = parseInt(data.quantity); | ||
axios.post("api/basket/add", { | ||
...basketId, | ||
productId: data.productId, | ||
quantity: data.quantity === null || data.quantity === undefined ? 1 : data.quantity, | ||
quantity: !data.quantity || data.quantity < 1 ? 1 : data.quantity, | ||
attributeItems: data.attributeItems.length ? data.attributeItems : undefined, | ||
@@ -320,6 +323,9 @@ restaurantId: data.restaurantId, | ||
data.quantity = parseInt(data.quantity); | ||
if(basketProduct) basketProduct.changingQuantity = true; | ||
return axios.post('api/basket/add-product-package-items', { | ||
...basketId, | ||
...data | ||
...data, | ||
quantity: !data.quantity || data.quantity < 1 ? 1 : data.quantity, | ||
}).then(async () => { | ||
@@ -326,0 +332,0 @@ return await dispatch('shoppingCartUpdateCallback', { restaurantId: data.restaurantId }); |
94979
2264