orderiom-api-package 0.4.91 → 0.4.92

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/common.js +7 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orderiom-api-package",
3
- "version": "0.4.91",
3
+ "version": "0.4.92",
4
4
  "description": "This package will install all necessary API calls for every orderiom restaurant",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
package/src/common.js CHANGED
@@ -155,11 +155,13 @@ export const unassignBasket = (restaurantId = null) => {
155
155
  )).map(basket => basket.basketId)
156
156
 
157
157
  // unassign all filtered baskets from logged-in user (so these baskets would not need a private token anymore)
158
- return axios.post(`api/basket/unassigned-basket`, {
159
- basketId: basketsIdToUnassign
160
- })
161
- .then(res => res)
162
- .catch(commonErrorCallback());
158
+ return Promise.all(
159
+ basketsIdToUnassign.map(basketId =>
160
+ axios.post(`api/basket/unassigned-basket`, {
161
+ basketId
162
+ })
163
+ )
164
+ ).catch(commonErrorCallback())
163
165
  }
164
166
 
165
167
  const getAuthToken = async (hadPrivateToken = false) => {