Рефакторинга чуть чуть вроде

This commit is contained in:
Disledg
2025-01-07 08:30:17 +03:00
parent 63f7251860
commit 54bfedd6f2
6 changed files with 360 additions and 307 deletions

View File

@@ -69,7 +69,7 @@ class PanelInteraction:
self.logger.exception(f"Login request failed: {e}")
raise
async def get_inbound_info(self, inbound_id):
async def get_inbound_info(self, inbound_id: int = 1):
"""
Fetch inbound information by ID.
@@ -83,6 +83,8 @@ class PanelInteraction:
async with session.get(
url, headers=self.headers, ssl=self.ssl_context, timeout=10
) as response:
response_text = await response.text() # Получаем текст ответа
self.logger.info(f"Inbound Info (raw): {response_text}") # Логируем сырой текст
if response.status == 200:
return await response.json()
else: