Skip to content

Commit

Permalink
Object property name adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
GTFalcao committed Nov 26, 2024
1 parent 3e4105b commit 0dbdb33
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions components/webflow_v2/webflow_v2.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default {
const collections = await this.getCollections(siteId);

return collections.map((collection) => ({
label: collection.name,
label: collection.displayName || collection.slug,
value: collection.id,
}));
},
Expand All @@ -51,7 +51,7 @@ export default {
const items = await this.getItems(page, collectionId);

return items.map((item) => ({
label: item.name,
label: item.fieldData?.name || item.fieldData?.slug,
value: item.id,
}));
},
Expand Down Expand Up @@ -202,9 +202,7 @@ export default {
async getCollection(collectionId) {
const webflow = this._createApiClient();

return await webflow.collections.get({
collectionId,
});
return await webflow.collections.get(collectionId);
},
/**
* Get a list of collections;
Expand All @@ -218,9 +216,7 @@ export default {

if (!siteId) return [];

const response = await webflow.collections.list({
siteId: siteId,
});
const response = await webflow.collections.list(siteId);
return response?.collections;
},
/**
Expand All @@ -235,9 +231,7 @@ export default {

if (!collectionId) return [];

const response = await webflow.collections.items.listItems({
collectionId,
}, {
const response = await webflow.collections.items.listItems(collectionId, {
limit: constants.LIMIT,
offset: page,
});
Expand Down

0 comments on commit 0dbdb33

Please sign in to comment.