Skip to content

Commit

Permalink
Get client ips fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
iwatkot committed Jun 20, 2024
1 parent 013cebb commit 93f4a2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions py3xui/api/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,7 @@ def delete_depleted(self, inbound_id: int) -> None:
api.client.delete_depleted(inbound.id)
```
""" # pylint: disable=line-too-long
endpoint = "panel/api/inbounds/delDepletedClients/0"
if inbound_id:
endpoint += f"{inbound_id}"
endpoint = f"panel/api/inbounds/delDepletedClients/{inbound_id}"
headers = {"Accept": "application/json"}

url = self._url(endpoint)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def test_get_client_ips():
api = Api(HOST, USERNAME, PASSWORD, skip_login=True)
ips = api.client.get_ips(EMAIL)

assert ips is None, f"Expected None, got {ips}"
assert ips == [], f"Expected None, got {ips}"


def _prepare_inbound() -> Inbound:
Expand Down

0 comments on commit 93f4a2b

Please sign in to comment.