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
224
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.42 to 0.2.43

2

package.json
{
"name": "orderiom-api-package",
"version": "0.2.42",
"version": "0.2.43",
"description": "this package will install all neccessary api calls for every orderiom restaurant",

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

@@ -16,2 +16,3 @@ import axios from "axios";

fetchingBlogs: false,
reservedTables:[]
});

@@ -35,2 +36,5 @@

},
setReservedTables(state, reservedTables) {
state.reservedTables = reservedTables
},
setBlogs(state, blogs) {

@@ -251,2 +255,36 @@ state.blogs = blogs

},
addReservedTables({ commit }, data) {
return axios
.post("api/restaurant/reserve-table", {
restaurantId: restaurantId,
tableInfo: data.tableInfo,
}).then((result) => {
commit('setReservedTables', result.data.data);
return {
type: 'success',
msg: ''
}
}).catch((error) => {
if(!error.response){
return {
type: 'error',
msg: 'There was an error in adding reserved tables',
}
}
const status = error.response.status;
if (status === 422) {
return {
type: 'error',
msg: Object.values(error.response.data.error.validation).map(m => { return m[0] }).toString()
}
}
if ([401, 403, 404, 400].includes(status)) {
return {
type: 'error',
msg: error.response.data.message.body,
}
}
});
},
getBlogs({ commit }, restaurantId) {

@@ -253,0 +291,0 @@ return axios.get('api/blogs', {

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