orderiom-api-package 0.3.11 → 0.3.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orderiom-api-package",
3
- "version": "0.3.11",
3
+ "version": "0.3.13",
4
4
  "description": "This package will install all necessary API calls for every orderiom restaurant",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -106,7 +106,7 @@ const actions = {
106
106
  .then(async res => {
107
107
  basketData.push({
108
108
  restaurantId: restaurantIdEnv,
109
- basketId: res.data.data.id,
109
+ basketId: res.data.data.basketId,
110
110
  });
111
111
  localStorage.setItem("basket", JSON.stringify(basketData));
112
112
  const result = await dispatch('product/getBasket', restaurantIdEnv, { root: true }) ;
@@ -164,7 +164,7 @@ const actions = {
164
164
  axios.post("api/basket/add", {
165
165
  ...basketId,
166
166
  productId: data.productId,
167
- quantity: 1,
167
+ quantity: data.quantity === null || data.quantity === undefined ? 1 : data.quantity,
168
168
  attributeItems: data.attributeItems.length ? data.attributeItems : undefined,
169
169
  restaurantId: data.restaurantId,
170
170
  extraInfo: data.extraInfo
@@ -731,4 +731,4 @@ export default {
731
731
  state,
732
732
  mutations,
733
733
  actions
734
- };
734
+ };