diff --git a/src/stores/app.js b/src/stores/app.js index ad0babd8..1f99a7e4 100644 --- a/src/stores/app.js +++ b/src/stores/app.js @@ -32,8 +32,7 @@ export const useAppStore = defineStore('hedera', { }), actions: { async getMenuLinks() { - const { data: sections } = await api.get('MyMenus'); - + const { data: sections } = await api.get('MyMenus/myMenu'); if (!sections) return; const sectionMap = new Map(); @@ -92,32 +91,39 @@ export const useAppStore = defineStore('hedera', { async checkRedirect(checkoutContinue) { const orderId = this.basketOrderId; - const myOrder_checkConfig = await api.post('applications/myOrder_checkConfig/execute-proc', { - schema: 'hedera', - params: [orderId], - }, { - validateStatus: () => true, - }); + const myOrder_checkConfig = await api.post( + 'applications/myOrder_checkConfig/execute-proc', + { + schema: 'hedera', + params: [orderId] + }, + { + validateStatus: () => true + } + ); - if (myOrder_checkConfig.status >= 200 && myOrder_checkConfig.status < 300) { - return true; + if ( + myOrder_checkConfig.status >= 200 && + myOrder_checkConfig.status < 300 + ) { + return true; } switch (myOrder_checkConfig.data.error?.message) { - case 'orderNotOwnedByUser': - notify(t(`errors.orderNotOwnedByUser`), 'negative'); - case 'orderConfirmed': - case 'orderNotOwnedByUser': - this.unloadOrder(); - await this.redirect(); - break; - default: - this.router.push({ - name: 'checkout', - params: { id: this.basketOrderId }, - query: { continue: checkoutContinue } - }); - notify(myOrder_checkConfig.data.error.message, 'negative'); + case 'orderNotOwnedByUser': + notify(t(`errors.orderNotOwnedByUser`), 'negative'); + case 'orderConfirmed': + case 'orderNotOwnedByUser': + this.unloadOrder(); + await this.redirect(); + break; + default: + this.router.push({ + name: 'checkout', + params: { id: this.basketOrderId }, + query: { continue: checkoutContinue } + }); + notify(myOrder_checkConfig.data.error.message, 'negative'); } return false;