From 57959a37c18c2697d405128f218da954b22982f5 Mon Sep 17 00:00:00 2001 From: Erfan Date: Thu, 31 Oct 2024 17:17:59 +0330 Subject: [PATCH] chore: fix req.txt and get users --- requirements.txt | 2 +- utils/panel.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index f6d2380..bad9087 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,6 +5,6 @@ pydantic==2.8.2 qrcode==7.4.2 aiosqlite==0.20.0 APScheduler==3.10.4 -marzban==0.2.6 +marzban==0.2.8 pillow==10.4.0 alembic==1.13.1 \ No newline at end of file diff --git a/utils/panel.py b/utils/panel.py index df16660..a348b39 100644 --- a/utils/panel.py +++ b/utils/panel.py @@ -11,7 +11,7 @@ from db import TokenManager from utils.log import logger -marzban_panel = MarzbanAPI(MARZBAN_ADDRESS) +marzban_panel = MarzbanAPI(MARZBAN_ADDRESS, timeout=30.0, verify=False) async def inbounds() -> dict[str, list[ProxyInbound]]: @@ -100,7 +100,7 @@ async def get_users(offset: int = 0, limit: int = 50) -> list[UserResponse]: try: get_token = await TokenManager.get() users = await marzban_panel.get_users( - token=get_token.token, offset=offset, limit=offset + token=get_token.token, offset=offset, limit=limit ) return users.users if users else False except Exception as e: