Skip to content

Commit

Permalink
fix: fetch featured
Browse files Browse the repository at this point in the history
  • Loading branch information
acnormun committed Apr 9, 2024
1 parent 24781b9 commit 32fbe59
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/api/appType.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export default {
deleteApp(appCode, appUuid) {
return request.$http.delete(`${resource}/${appCode}/apps/${appUuid}/`);
},
fetchFeatured() {
return request.$http.get(`${resource}/featureds/`);
async fetchFeatured() {
return await request.$http.get(`${resource}/featureds/`).then((r) => r.data);
},
updateAppConfig(appCode, appUuid, data) {
return request.$http.patch(`${resource}/${appCode}/apps/${appUuid}/configure/`, data);
Expand Down
2 changes: 1 addition & 1 deletion src/api/appType/ecommerce/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const resource = '/api/v1/apptypes';

export default {
getAllEcommerceTypes() {
return request.$http.get(`${resource}/?category=ecommerce`);
return request.$http.get(`${resource}/?category=ecommerce`).then((r) => r.data);
},
connectVtexCatalog(code, appUuid, payload) {
return request.$http.post(`${resource}/${code}/${appUuid}/catalogs/`, payload);
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 } = await appType.fetchFeatured();
const data = await appType.fetchFeatured();
this.featuredApps = data;
this.loadingFeaturedApps = false;
} catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion src/stores/modules/appType/ecommerce/ecommerce.store.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const ecommerce_store = defineStore('ecommerce', {
this.errorEcommerceApps = null;
this.ecommerceAppsList = null;
try {
const { data } = await ecommerce.getAllEcommerceTypes();
const data = await ecommerce.getAllEcommerceTypes();
this.ecommerceAppsList = data;
this.loadingEcommerceApps = false;
} catch (err) {
Expand Down

0 comments on commit 32fbe59

Please sign in to comment.