From e444266db4c2dfef7af86ff4b80f48625fafad1c Mon Sep 17 00:00:00 2001 From: wbuezas Date: Wed, 19 Feb 2025 13:39:00 -0300 Subject: [PATCH] My menu query adaptation --- src/stores/app.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/stores/app.js b/src/stores/app.js index d950af10..71b3bb64 100644 --- a/src/stores/app.js +++ b/src/stores/app.js @@ -1,5 +1,5 @@ import { defineStore } from 'pinia'; -import { jApi } from '@/boot/axios'; +import { jApi, api } from '@/boot/axios'; import useNotify from '@/composables/useNotify.js'; import { i18n } from '@/boot/i18n'; import { useQuasar } from 'quasar'; @@ -32,7 +32,10 @@ export const useAppStore = defineStore('hedera', { }), actions: { async getMenuLinks() { - const sections = await jApi.query('SELECT * FROM myMenu'); + const { data: sections } = await api.get('MyMenus/getSections'); + + if (!sections) return; + const sectionMap = new Map(); for (const section of sections) { sectionMap.set(section.id, section);