Skip to content

Commit 778a3da

Browse files
author
Xavier Agostini
authored
Acq 2487 sort integration settings (#559)
* sort integration settings * regen catalog * regen catalog
1 parent 1a723d7 commit 778a3da

File tree

6 files changed

+2995
-3016
lines changed

6 files changed

+2995
-3016
lines changed

scripts/catalog.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,23 @@ const updateDestinations = async () => {
235235
})
236236

237237
let url = `connections/destinations/catalog/${slug}`
238-
238+
239+
let settings = destination.settings
240+
settings.sort((a, b) => {
241+
if(a.name < b.name) { return -1; }
242+
if(a.name > b.name) { return 1; }
243+
return 0;
244+
})
245+
settings.forEach(setting => {
246+
if (setting.settings.length > 0) {
247+
setting.settings.sort((a, b) => {
248+
if(a.name < b.name) { return -1; }
249+
if(a.name > b.name) { return 1; }
250+
return 0;
251+
})
252+
}
253+
})
254+
239255
let updatedDestination = {
240256
display_name: destination.display_name,
241257
slug,
@@ -255,7 +271,7 @@ const updateDestinations = async () => {
255271
platforms: destination.platforms,
256272
browserUnbundlingSupported: destination.browserUnbundlingSupported,
257273
browserUnbundlingPublic: destination.browserUnbundlingPublic,
258-
settings: destination.settings,
274+
settings,
259275
connection_modes,
260276
previous_names: destination.previous_names
261277
}

src/_data/catalog/destination_categories.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT
2-
# destination categories last updated 2020-01-22
2+
# destination categories last updated 2020-01-28
33
items:
44
- display_name: Email Marketing
55
slug: email-marketing

0 commit comments

Comments
 (0)