ID_Inbound

This commit is contained in:
Vladless
2024-11-24 22:29:32 +03:00
parent 274bbc66be
commit 1370ff983c
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ async def add_client(
expiry_time: int,
enable: bool,
flow: str,
inbound_id: int,
inbound_id: int,
):
"""
Adds a client to the server via 3x-ui.
+2 -1
View File
@@ -98,6 +98,7 @@ async def renew_key_in_cluster(cluster_id, email, client_id, new_expiry_time, to
logger.error(f"Не удалось продлить ключ {client_id} в кластере {cluster_id}: {e}")
raise e
async def delete_key_from_db(client_id, session):
try:
await session.execute("DELETE FROM keys WHERE client_id = $1", client_id)
@@ -183,4 +184,4 @@ async def update_key_on_cluster(tg_id, client_id, email, expiry_time, cluster_id
except Exception as e:
logger.error(f"Ошибка при обновлении ключа на серверах кластера {cluster_id} для {client_id}: {e}")
raise e
raise e
+1 -1
View File
@@ -5,7 +5,7 @@ import uuid
from py3xui import AsyncApi
from client import add_client
from config import ADMIN_PASSWORD, ADMIN_USERNAME, CLUSTERS, PUBLIC_LINK, TRIAL_TIME, TOTAL_GB
from config import ADMIN_PASSWORD, ADMIN_USERNAME, CLUSTERS, PUBLIC_LINK, TOTAL_GB, TRIAL_TIME
from database import store_key, use_trial
from handlers.texts import INSTRUCTIONS
from handlers.utils import generate_random_email, get_least_loaded_cluster