New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

orderiom-api-package

Package Overview
Dependencies
Maintainers
1
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

orderiom-api-package - npm Package Compare versions

Comparing version 0.3.28 to 0.3.29

2

package.json
{
"name": "orderiom-api-package",
"version": "0.3.28",
"version": "0.3.29",
"description": "This package will install all necessary API calls for every orderiom restaurant",

@@ -5,0 +5,0 @@ "main": "index.js",

import axios from "axios";
import Vue from 'vue';
import {commonErrorCallback, calculateBasketIdParameter, updateBasket, restaurantIdEnv} from '../common';

@@ -149,43 +148,44 @@

getCategoriesWithProducts({ commit, dispatch }, restaurantId) {
return axios
.get("api/restaurant/category", { params: { restaurantId: restaurantId } })
.then((res) => {
let categories = res.data.data
commit("setSelectedCategory", categories[0]);
axios
.get("api/restaurant/category", { params: { restaurantId: restaurantId, extra: 1 } })
.then((res) => {
if (res.data.data.length) {
categories = [...categories, ...res.data.data];
for (let i = 0; i < categories.length; i++) {
const element = categories[i];
dispatch("getProducts", {
category: element,
restaurantId: restaurantId,
})
.then((res) => {
Vue.set(element, 'products', res.data);
});
}
commit('setCategories', categories);
}
else {
commit('setCategories', categories);
for (let i = 0; i < categories.length; i++) {
const element = categories[i];
dispatch("getProducts", {
category: element,
restaurantId: restaurantId,
})
.then((res) => {
Vue.set(element, 'products', res.data)
});
}
}
return axios.get("api/restaurant/category", {
params: {
restaurantId: restaurantId
}
}).then(res => {
let categories = res.data.data
commit("setSelectedCategory", categories[0]);
axios.get("api/restaurant/category", {
params: {
restaurantId: restaurantId,
extra: 1
}
}).then(res => {
if (res.data.data.length) {
categories = [...categories, ...res.data.data];
categories.forEach(cat => {
dispatch("getProducts", {
category: cat,
restaurantId: restaurantId,
}).then(res => {
cat.products = res.data;
cat.products.push();
});
});
commit('setCategories', categories);
} else {
commit('setCategories', categories);
categories.forEach(cat => {
dispatch("getProducts", {
category: cat,
restaurantId: restaurantId,
}).then(res => {
cat.products = res.data;
cat.products.push();
});
})
}
})
.catch(
commonErrorCallback()
);
}).catch(
commonErrorCallback()
);
},

@@ -192,0 +192,0 @@ getCategories({ commit, dispatch }, restaurantId) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc