Skip to content

Commit 0d9a23e

Browse files
authored
Merge pull request #1173 from IBM/fix-gateway-add
Fix gateway addition from UI
2 parents 785c607 + 27f801b commit 0d9a23e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

mcpgateway/static/admin.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7692,6 +7692,10 @@ async function handleGatewayFormSubmit(e) {
76927692
// if (authType === "oauth") {
76937693
// ... backend handles this now ...
76947694
// }
7695+
const authType = formData.get("auth_type");
7696+
if (authType !== "oauth") {
7697+
formData.set("oauth_grant_type", "");
7698+
}
76957699

76967700
formData.append("visibility", formData.get("visibility"));
76977701

@@ -8282,6 +8286,10 @@ async function handleEditGatewayFormSubmit(e) {
82828286
// if (authType === "oauth") {
82838287
// ... backend handles this now ...
82848288
// }
8289+
const authType = formData.get("auth_type");
8290+
if (authType !== "oauth") {
8291+
formData.set("oauth_grant_type", "");
8292+
}
82858293

82868294
const isInactiveCheckedBool = isInactiveChecked("gateways");
82878295
formData.append("is_inactive_checked", isInactiveCheckedBool);

0 commit comments

Comments
 (0)