From 79eed9b854e81badd91736ba4d43b7607b455c27 Mon Sep 17 00:00:00 2001 From: prakharsapre Date: Mon, 12 Aug 2024 11:38:58 -0500 Subject: [PATCH] Remove console logs and renamed api --- .../io/trino/gateway/ha/resource/GatewayWebAppResource.java | 2 +- webapp/src/components/routing-rules.tsx | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/gateway-ha/src/main/java/io/trino/gateway/ha/resource/GatewayWebAppResource.java b/gateway-ha/src/main/java/io/trino/gateway/ha/resource/GatewayWebAppResource.java index ea6ceb8f2..62f3e8413 100644 --- a/gateway-ha/src/main/java/io/trino/gateway/ha/resource/GatewayWebAppResource.java +++ b/gateway-ha/src/main/java/io/trino/gateway/ha/resource/GatewayWebAppResource.java @@ -441,7 +441,7 @@ public Response readExactMatchSourceSelector() @RolesAllowed("USER") @Produces(MediaType.APPLICATION_JSON) @Path("/getRoutingRules") - public Response readRoutingRules() + public Response getRoutingRules() { String content = null; try { diff --git a/webapp/src/components/routing-rules.tsx b/webapp/src/components/routing-rules.tsx index 06f696ab8..fd66bb2f1 100644 --- a/webapp/src/components/routing-rules.tsx +++ b/webapp/src/components/routing-rules.tsx @@ -21,8 +21,7 @@ export function RoutingRules() { setRules(data); setEditingStates(new Array(data.length).fill(false)); setFormApis(new Array(data.length).fill(null)); - }).catch((error) => { - console.error("Error fetching routing rules: ", error); + }).catch(() => { Toast.error("Failed to fetch routing rules"); }); }; @@ -66,7 +65,6 @@ export function RoutingRules() { Toast.success("Routing rule updated successfully"); } catch (error) { - console.error("Error updating routing rule: ", error); Toast.error("Failed to update routing rule"); } }