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.36 to 0.3.37

2

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

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

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

@@ -150,45 +151,45 @@ const state = () => ({

getCategoriesWithProducts({ commit, dispatch }, restaurantId) {
return $http.get("api/restaurant/category", {
params: {
restaurantId: restaurantId
}
}).then(res => {
let categories = res.data.data
commit("setSelectedCategory", categories[0]);
return $http
.get("api/restaurant/category", { params: { restaurantId: restaurantId } })
.then((res) => {
let categories = res.data.data
commit("setSelectedCategory", categories[0]);
$http
.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)
});
}
}
$http.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()
);
},
getCategories({ commit, dispatch }, restaurantId) {

@@ -195,0 +196,0 @@ return $http

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