orderiom-api-package
Advanced tools
Comparing version 0.2.40 to 0.2.41
{ | ||
"name": "orderiom-api-package", | ||
"version": "0.2.40", | ||
"version": "0.2.41", | ||
"description": "this package will install all neccessary api calls for every orderiom restaurant", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -132,2 +132,5 @@ import axios from "axios"; | ||
}, | ||
// TODO: note the axios in loop | ||
// Orderiom api doesn't use this function | ||
// check whether ordermood is using this function or not | ||
getCategoriesWithProducts({ commit, dispatch }, restaurantId) { | ||
@@ -197,2 +200,4 @@ return axios | ||
let categories = res.data.data; | ||
//TODO: why calling an api write after another while we can do it together? | ||
//TODO: this api call returns empty on restaurant refresh | ||
axios | ||
@@ -475,2 +480,7 @@ .get("api/restaurant/category", { params: { restaurantId: restaurantId, extra: 1 } }) | ||
dispatch('getProducts', { | ||
restaurantId, | ||
category: state.selectedCategory || state.categories[0] | ||
}); | ||
const result = await dispatch("getBasket", restaurantId); | ||
@@ -477,0 +487,0 @@ |
126617
2865