diff --git a/src/api/appType/ecommerce/index.js b/src/api/appType/ecommerce/index.js index 6067d9f2..c5382994 100644 --- a/src/api/appType/ecommerce/index.js +++ b/src/api/appType/ecommerce/index.js @@ -7,7 +7,9 @@ export default { return await request.$http.get(`${resource}/?category=ecommerce`).then((r) => r.data); }, connectVtexCatalog(code, appUuid, payload) { - return request.$http.post(`${resource}/${code}/${appUuid}/catalogs/`, payload); + return request.$http + .post(`${resource}/${code}/${appUuid}/catalogs/`, payload) + .then((r) => r.data); }, async getVtexAppUuid(code) { return await request.$http.get(`${resource}/${code}/apps/get-app-uuid/`).then((r) => r.data); diff --git a/src/api/appType/generic/index.js b/src/api/appType/generic/index.js index 14651c87..409543c7 100644 --- a/src/api/appType/generic/index.js +++ b/src/api/appType/generic/index.js @@ -4,7 +4,7 @@ const resource = '/api/v1/apptypes/generic'; export default { async getAllGenericTypes() { - return (await request.$http.get(`${resource}/apptypes/`)).then((r) => r.data); + return await request.$http.get(`${resource}/apptypes/`).then((r) => r.data); }, async getAppForm(channelCode) { return await request.$http.get(`${resource}/channel-type/${channelCode}/`).then((r) => r.data); diff --git a/src/main.js b/src/main.js index c02030c2..40b60a5d 100644 --- a/src/main.js +++ b/src/main.js @@ -13,7 +13,6 @@ import { makeServer } from '@/miragejs/server'; import App from './App.vue'; import router from './router'; -import { createPersistedState } from 'pinia-plugin-persistedstate'; const app = createApp(App); @@ -47,7 +46,6 @@ const pinia = createPinia(); pinia.use(({ store }) => { store.router = markRaw(router); }); -pinia.use(createPersistedState); app.use(pinia).use(router).use(Unnnic).use(i18n).use(vueUse); diff --git a/src/stores/modules/appType/appType.store.js b/src/stores/modules/appType/appType.store.js index 3ec2d7be..b858c2da 100644 --- a/src/stores/modules/appType/appType.store.js +++ b/src/stores/modules/appType/appType.store.js @@ -151,7 +151,7 @@ export const app_type = defineStore('appType', { this.errorFeaturedApps = null; this.featuredApps = null; try { - const data = appType.fetchFeatured(); + const data = await appType.fetchFeatured(); this.featuredApps = data; this.loadingFeaturedApps = false; } catch (err) {