@@ -3207,12 +3207,20 @@ async function editGateway(gatewayId) {
3207
3207
// OAuth fields
3208
3208
const oauthGrantTypeField = safeGetElement ( "oauth-grant-type-gw-edit" ) ;
3209
3209
const oauthClientIdField = safeGetElement ( "oauth-client-id-gw-edit" ) ;
3210
- const oauthClientSecretField = safeGetElement ( "oauth-client-secret-gw-edit" ) ;
3210
+ const oauthClientSecretField = safeGetElement (
3211
+ "oauth-client-secret-gw-edit" ,
3212
+ ) ;
3211
3213
const oauthTokenUrlField = safeGetElement ( "oauth-token-url-gw-edit" ) ;
3212
- const oauthAuthUrlField = safeGetElement ( "oauth-authorization-url-gw-edit" ) ;
3213
- const oauthRedirectUriField = safeGetElement ( "oauth-redirect-uri-gw-edit" ) ;
3214
+ const oauthAuthUrlField = safeGetElement (
3215
+ "oauth-authorization-url-gw-edit" ,
3216
+ ) ;
3217
+ const oauthRedirectUriField = safeGetElement (
3218
+ "oauth-redirect-uri-gw-edit" ,
3219
+ ) ;
3214
3220
const oauthScopesField = safeGetElement ( "oauth-scopes-gw-edit" ) ;
3215
- const oauthAuthCodeFields = safeGetElement ( "oauth-auth-code-fields-gw-edit" ) ;
3221
+ const oauthAuthCodeFields = safeGetElement (
3222
+ "oauth-auth-code-fields-gw-edit" ,
3223
+ ) ;
3216
3224
3217
3225
// Hide all auth sections first
3218
3226
if ( authBasicSection ) {
@@ -3271,7 +3279,9 @@ async function editGateway(gatewayId) {
3271
3279
// Show/hide authorization code fields based on grant type
3272
3280
if ( oauthAuthCodeFields ) {
3273
3281
oauthAuthCodeFields . style . display =
3274
- config . grant_type === "authorization_code" ? "block" : "none" ;
3282
+ config . grant_type === "authorization_code"
3283
+ ? "block"
3284
+ : "none" ;
3275
3285
}
3276
3286
}
3277
3287
if ( oauthClientIdField && config . client_id ) {
@@ -3289,7 +3299,11 @@ async function editGateway(gatewayId) {
3289
3299
if ( oauthRedirectUriField && config . redirect_uri ) {
3290
3300
oauthRedirectUriField . value = config . redirect_uri ;
3291
3301
}
3292
- if ( oauthScopesField && config . scopes && Array . isArray ( config . scopes ) ) {
3302
+ if (
3303
+ oauthScopesField &&
3304
+ config . scopes &&
3305
+ Array . isArray ( config . scopes )
3306
+ ) {
3293
3307
oauthScopesField . value = config . scopes . join ( " " ) ;
3294
3308
}
3295
3309
}
@@ -3716,7 +3730,9 @@ function handleAuthTypeSelection(
3716
3730
3717
3731
// Hide all fields first
3718
3732
[ basicFields , bearerFields , headersFields ] . forEach ( ( field ) => {
3719
- if ( field ) field . style . display = "none" ;
3733
+ if ( field ) {
3734
+ field . style . display = "none" ;
3735
+ }
3720
3736
} ) ;
3721
3737
3722
3738
// Hide OAuth fields if they exist
@@ -3727,10 +3743,14 @@ function handleAuthTypeSelection(
3727
3743
// Show relevant field based on selection
3728
3744
switch ( value ) {
3729
3745
case "basic" :
3730
- if ( basicFields ) basicFields . style . display = "block" ;
3746
+ if ( basicFields ) {
3747
+ basicFields . style . display = "block" ;
3748
+ }
3731
3749
break ;
3732
3750
case "bearer" :
3733
- if ( bearerFields ) bearerFields . style . display = "block" ;
3751
+ if ( bearerFields ) {
3752
+ bearerFields . style . display = "block" ;
3753
+ }
3734
3754
break ;
3735
3755
case "authheaders" : {
3736
3756
if ( headersFields ) {
@@ -3748,7 +3768,9 @@ function handleAuthTypeSelection(
3748
3768
break ;
3749
3769
}
3750
3770
case "oauth" :
3751
- if ( oauthFields ) oauthFields . style . display = "block" ;
3771
+ if ( oauthFields ) {
3772
+ oauthFields . style . display = "block" ;
3773
+ }
3752
3774
break ;
3753
3775
default :
3754
3776
// All fields already hidden
0 commit comments