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.2.55 to 0.2.56

2

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

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

@@ -260,7 +260,10 @@ import axios from "axios";

},
getBasket({ commit, rootState }, customRestaurantId = undefined) {
const basket = JSON.parse(localStorage.getItem("basket"));
const basketId = !rootState.orderiomApiPackage.auth.privateToken ? {
basketId: basket.find((basket) => basket.restaurantId == restaurantId).basketId
} : {}
getBasket({ commit, rootState }) {
let basketId = undefined;
try{
basketId = calculateBasketIdParameter(!!rootState.orderiomApiPackage.auth.privateToken);
} catch(e) {
console.error(e);
return false;
}

@@ -270,4 +273,4 @@ commit('startFetchingBasket');

params: {
...basketId,
restaurantId: customRestaurantId || restaurantId
basketId,
restaurantId
}

@@ -292,14 +295,13 @@ }).then(res => {

//TODO: This condition is always true.
if (basketInfo.id != basketId) {
const index = basket.indexOf(basket.find((basket) => basket.restaurantId == restaurantId));
if (index > -1) {
basket.splice(index, 1);
}
basket.push({
restaurantId: restaurantId,
if (parseInt(basketInfo.id) !== parseInt(basketId)) {
const baskets = JSON.parse(localStorage.getItem('basket'));
const basketIndex = baskets.findIndex(basket => parseInt(basket.restaurantId) === restaurantId);
if (basketIndex > -1) baskets.splice(basketIndex, 1);
baskets.push({
restaurantId,
basketId: basketInfo.id,
});
localStorage.setItem("basket", JSON.stringify(basket));
localStorage.setItem('basket', JSON.stringify(baskets));
}
commit('basketLoadedOnce');

@@ -306,0 +308,0 @@ return true;

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