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.58 to 0.3.0

2

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

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

@@ -161,3 +161,7 @@ {

"pattern_is_required": "Sie müssen Ihrem Muster Produkte hinzufügen.",
"newsletter_successfully_added": "Ihre E-Mail wurde erfolgreich hinzugefügt."
"newsletter_successfully_added": "Ihre E-Mail wurde erfolgreich hinzugefügt.",
"There was an error in fetching the blogs": "Beim Abrufen der Blogs ist ein Fehler aufgetreten",
"There was an error in fetching the blog": "Beim Abrufen des Blogs ist ein Fehler aufgetreten",
"Something went wrong": "Etwas ist schief gelaufen",
"Basket not found": "Korb nicht gefunden"
}

@@ -161,3 +161,7 @@ {

"pattern_is_required": "you have to add products to your pattern.",
"newsletter_successfully_added": "Your email has been added successfuly."
"newsletter_successfully_added": "Your email has been added successfuly.",
"There was an error in fetching the blogs": "There was an error in fetching the blogs",
"There was an error in fetching the blog": "There was an error in fetching the blog",
"Something went wrong": "Something went wrong",
"Basket not found": "Basket not found"
}

@@ -706,3 +706,3 @@ import axios from "axios";

axios.post('api/basket/update-extraInfo', {
return axios.post('api/basket/update-extraInfo', {
basketId,

@@ -712,5 +712,6 @@ ...data

updateBasket({commit, basketId, res, isOutsideProduct: true})
).catch(
commonErrorCallback()
);
).catch(err => {
console.error(err);
return false;
});
}

@@ -717,0 +718,0 @@ }

@@ -360,3 +360,53 @@ import axios from "axios";

});
}
},
getProductsFromAllCategories({ commit, state, rootState }, categories = null) {
let basketId = undefined;
try{
basketId = calculateBasketIdParameter(!!rootState.orderiomApiPackage.auth.privateToken);
} catch(e) {
console.error(e);
return { type: 'error', msg: 'Basket not found' }
}
const result = [];
// TODO: It is recommended to use a new api instead of multiple api calls inside a loop.
(categories || state.categories).forEach(category => {
axios.get("api/restaurant/products", {
params: {
categoryId: data.category.id,
restaurantId,
basketId
}
}).then(res => {
const products = res.data.data;
products.forEach(m => {
const productFoundInShoppingCart = state.ShoppingCart.find(p => p.RestaurantProductId === m.id);
if (!productFoundInShoppingCart) {
m.quantity = 0;
return;
}
if (!m.is_package) {
m.quantity = productFoundInShoppingCart.quantity;
return;
}
let qty = 0;
state.ShoppingCart.forEach(b => {
if (b.RestaurantProductId !== m.id) return;
qty += b.quantity;
});
m.quantity = qty;
})
result.push({...category, products});
}).catch(
commonErrorCallback()
);
});
return result
},
};

@@ -363,0 +413,0 @@

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