Skip to content

Commit 38c5683

Browse files
committed
Add logging for firewall
1 parent 02f83ca commit 38c5683

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/components/Firewall/Firewall.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ export const getFirewallBannedEntryId = async (ip: string): Promise<string> => {
4646
},
4747
});
4848

49-
return result[0].id;
49+
if(apiker.debug){
50+
console.log("getFirewallBannedEntryId", result);
51+
}
52+
53+
return result?.[0]?.id || "";
5054
};
5155

5256
export const firewallUnbanIP = async (ip: string) => {
@@ -61,6 +65,9 @@ export const firewallUnbanIP = async (ip: string) => {
6165
const entryId = await getFirewallBannedEntryId(ip);
6266

6367
if(!entryId) {
68+
if(apiker.debug){
69+
console.log("firewallUnbanIP", "No entry found for ip", ip);
70+
}
6471
return;
6572
}
6673

0 commit comments

Comments
 (0)