mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Add "service" field in bans when sending it to the API from bwcli
This commit is contained in:
parent
0d6fdbdd18
commit
f29095a555
1 changed files with 1 additions and 1 deletions
|
|
@ -216,7 +216,7 @@ class CLI(ApiCaller):
|
|||
self.__logger.error(f"Failed to ban {ip} in redis: {e}")
|
||||
|
||||
try:
|
||||
if self.send_to_apis("POST", "/ban", data={"ip": ip, "exp": exp, "reason": reason}):
|
||||
if self.send_to_apis("POST", "/ban", data={"ip": ip, "exp": exp, "reason": reason, "service": "bwcli"}):
|
||||
return True, f"IP {ip} has been banned for {format_remaining_time(exp)} with reason {reason}"
|
||||
except BaseException as e:
|
||||
return False, f"Failed to ban {ip}: {e}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue