Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4bfad78

Browse files
author
Shamsul Arefin
committed
fix eslint errors
Signed-off-by: Shamsul Arefin <[email protected]>
1 parent 80c2cae commit 4bfad78

File tree

1 file changed

+32
-10
lines changed

1 file changed

+32
-10
lines changed

mcpgateway/static/admin.js

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3207,12 +3207,20 @@ async function editGateway(gatewayId) {
32073207
// OAuth fields
32083208
const oauthGrantTypeField = safeGetElement("oauth-grant-type-gw-edit");
32093209
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+
);
32113213
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+
);
32143220
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+
);
32163224

32173225
// Hide all auth sections first
32183226
if (authBasicSection) {
@@ -3271,7 +3279,9 @@ async function editGateway(gatewayId) {
32713279
// Show/hide authorization code fields based on grant type
32723280
if (oauthAuthCodeFields) {
32733281
oauthAuthCodeFields.style.display =
3274-
config.grant_type === "authorization_code" ? "block" : "none";
3282+
config.grant_type === "authorization_code"
3283+
? "block"
3284+
: "none";
32753285
}
32763286
}
32773287
if (oauthClientIdField && config.client_id) {
@@ -3289,7 +3299,11 @@ async function editGateway(gatewayId) {
32893299
if (oauthRedirectUriField && config.redirect_uri) {
32903300
oauthRedirectUriField.value = config.redirect_uri;
32913301
}
3292-
if (oauthScopesField && config.scopes && Array.isArray(config.scopes)) {
3302+
if (
3303+
oauthScopesField &&
3304+
config.scopes &&
3305+
Array.isArray(config.scopes)
3306+
) {
32933307
oauthScopesField.value = config.scopes.join(" ");
32943308
}
32953309
}
@@ -3716,7 +3730,9 @@ function handleAuthTypeSelection(
37163730

37173731
// Hide all fields first
37183732
[basicFields, bearerFields, headersFields].forEach((field) => {
3719-
if (field) field.style.display = "none";
3733+
if (field) {
3734+
field.style.display = "none";
3735+
}
37203736
});
37213737

37223738
// Hide OAuth fields if they exist
@@ -3727,10 +3743,14 @@ function handleAuthTypeSelection(
37273743
// Show relevant field based on selection
37283744
switch (value) {
37293745
case "basic":
3730-
if (basicFields) basicFields.style.display = "block";
3746+
if (basicFields) {
3747+
basicFields.style.display = "block";
3748+
}
37313749
break;
37323750
case "bearer":
3733-
if (bearerFields) bearerFields.style.display = "block";
3751+
if (bearerFields) {
3752+
bearerFields.style.display = "block";
3753+
}
37343754
break;
37353755
case "authheaders": {
37363756
if (headersFields) {
@@ -3748,7 +3768,9 @@ function handleAuthTypeSelection(
37483768
break;
37493769
}
37503770
case "oauth":
3751-
if (oauthFields) oauthFields.style.display = "block";
3771+
if (oauthFields) {
3772+
oauthFields.style.display = "block";
3773+
}
37523774
break;
37533775
default:
37543776
// All fields already hidden

0 commit comments

Comments
 (0)