Skip to content

Commit ef8709f

Browse files
committed
lint-web and format-web
Signed-off-by: Mihai Criveti <[email protected]>
1 parent a5d8f43 commit ef8709f

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

mcpgateway/static/admin.js

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4425,29 +4425,25 @@ async function handleEditToolFormSubmit(event) {
44254425
const response = await fetch(form.action, {
44264426
method: "POST",
44274427
body: formData,
4428-
headers: { "X-Requested-With": "XMLHttpRequest" }
4428+
headers: { "X-Requested-With": "XMLHttpRequest" },
44294429
});
4430-
console.log("response:", response);
4431-
result = await response.json();
4432-
console.log("result edit tool form:", result);
4433-
if (!result.success) {
4430+
console.log("response:", response);
4431+
result = await response.json();
4432+
console.log("result edit tool form:", result);
4433+
if (!result.success) {
44344434
throw new Error(result.message || "An error occurred");
4435-
}
4436-
else {
4435+
} else {
44374436
const redirectUrl = isInactiveCheckedBool
44384437
? `${window.ROOT_PATH}/admin?include_inactive=true#tools`
44394438
: `${window.ROOT_PATH}/admin#tools`;
44404439
window.location.href = redirectUrl;
44414440
}
4442-
44434441
} catch (error) {
44444442
console.error("Fetch error:", error);
44454443
showErrorMessage(error.message);
44464444
}
44474445
}
44484446

4449-
4450-
44514447
// ===================================================================
44524448
// ENHANCED FORM VALIDATION for All Forms
44534449
// ===================================================================
@@ -4990,7 +4986,6 @@ function setupFormHandlers() {
49904986
}
49914987
});
49924988
}
4993-
49944989
}
49954990

49964991
function setupSchemaModeHandlers() {

0 commit comments

Comments
 (0)