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