Skip to content

Commit

Permalink
fix: generic apps requests
Browse files Browse the repository at this point in the history
  • Loading branch information
acnormun committed Apr 10, 2024
1 parent e15dbea commit 90a4969
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/api/appType/ecommerce/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/api/appType/generic/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/stores/modules/appType/appType.store.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 90a4969

Please sign in to comment.