File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,15 @@ require('dotenv').config();
1414
1515const PAPI_URL = "https://api.segmentapis.com" ;
1616
17+ // Function to remove hidden fields from action
18+ const removeHiddenFields = function ( actions ) {
19+ return actions . map ( action => ( {
20+ ...action ,
21+ fields : action . fields . filter ( field => ! field . hidden )
22+ } )
23+ ) ;
24+ }
25+
1726
1827const updateDestinations = async ( ) => {
1928 let destinations = [ ] ;
@@ -88,9 +97,9 @@ const updateDestinations = async () => {
8897 settings . forEach ( setting => {
8998 setting . description = sanitize ( setting . description ) ;
9099 } ) ;
91-
92- let actions = destination . actions ;
93- let presets = destination . presets ;
100+
101+ let actions = removeHiddenFields ( destination . actions ) ;
102+ let presets = destination . presets ;
94103
95104 const clone = ( obj ) => Object . assign ( { } , obj ) ;
96105 const renameKey = ( object , key , newKey ) => {
You can’t perform that action at this time.
0 commit comments