File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
lib/cloud_controller/config_schemas/base Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -60,12 +60,13 @@ def read
6060 oauth_client : config . get ( :info , :app_ssh_oauth_client )
6161 }
6262 }
63-
6463 }
6564 }
6665
6766 response [ :links ] . merge! ( cloud_controller_v2 ( api_url_builder ) ) if config . get ( :temporary_enable_v2 )
6867
68+ response [ :links ] . merge! ( custom_links ( config . get ( :custom_root_links ) ) ) if config . get ( :custom_root_links )
69+
6970 [ 200 , Oj . dump ( response , mode : :compat ) ]
7071 end
7172
@@ -98,5 +99,13 @@ def cloud_controller_v2(api_url_builder)
9899 }
99100 }
100101 end
102+
103+ def custom_links ( links )
104+ hash = { }
105+ links . each do |value |
106+ hash [ value [ 'name' ] ] = { href : value [ 'href' ] }
107+ end
108+ hash
109+ end
101110 end
102111end
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ class ApiSchema < VCAP::Config
3030 optional ( :app_ssh_host_key_fingerprint ) => String ,
3131 optional ( :custom ) => Hash
3232 } ,
33+ optional ( :custom_root_links ) => Array ,
3334
3435 system_domain : String ,
3536 optional ( :system_domain_organization ) => enum ( String , NilClass ) ,
You can’t perform that action at this time.
0 commit comments