From 38c5683e069c82a14699080b92c0885660a1d173 Mon Sep 17 00:00:00 2001 From: Francisco Hodge Date: Wed, 1 Jan 2025 12:45:54 -0500 Subject: [PATCH] Add logging for firewall --- src/components/Firewall/Firewall.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/Firewall/Firewall.ts b/src/components/Firewall/Firewall.ts index e1f0683..51c2251 100644 --- a/src/components/Firewall/Firewall.ts +++ b/src/components/Firewall/Firewall.ts @@ -46,7 +46,11 @@ export const getFirewallBannedEntryId = async (ip: string): Promise => { }, }); - return result[0].id; + if(apiker.debug){ + console.log("getFirewallBannedEntryId", result); + } + + return result?.[0]?.id || ""; }; export const firewallUnbanIP = async (ip: string) => { @@ -61,6 +65,9 @@ export const firewallUnbanIP = async (ip: string) => { const entryId = await getFirewallBannedEntryId(ip); if(!entryId) { + if(apiker.debug){ + console.log("firewallUnbanIP", "No entry found for ip", ip); + } return; }