From 73c2f1f440c4776b691cc34b80fdb73108888ed3 Mon Sep 17 00:00:00 2001 From: dl Date: Fri, 30 May 2025 10:17:50 +0500 Subject: [PATCH] DEBUG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Пытаемся поймать передаваемый номер в логах --- auth.py | 1 + handlers/contact_handler.py | 1 + 2 files changed, 2 insertions(+) diff --git a/auth.py b/auth.py index a6bc809..c2847f1 100644 --- a/auth.py +++ b/auth.py @@ -14,6 +14,7 @@ def normalize_phone(phone: str) -> str: async def authorize_user(user_id: int, phone: str) -> bool: normalized = normalize_phone(phone) api_url = "https://papi.dataekb.ru/check_access" + print("DEBUG: phone (var normalized) is ", normalized) async with aiohttp.ClientSession() as session: try: async with session.get(api_url, params={"tel": normalized}) as response: diff --git a/handlers/contact_handler.py b/handlers/contact_handler.py index 0594d96..9f99547 100644 --- a/handlers/contact_handler.py +++ b/handlers/contact_handler.py @@ -15,6 +15,7 @@ def register_contact_handler(dp: Dispatcher): phone = msg.contact.phone_number if not await authorize_user(user_id, phone): + print("DEBUG: phone in contact_handler is ", phone) await msg.answer("Доступ запрещён, номер не идентифицирован") return