From 3d642a61c4749704004c73f085a800e5d166b73f Mon Sep 17 00:00:00 2001 From: Aidaho Date: Mon, 4 Nov 2024 19:54:27 +0300 Subject: [PATCH] v8.1.2: Change get_user_status to select_user_status Renamed get_user_status to select_user_status in roxy.py and db.py for better clarity and consistency. This modification ensures alignment in method naming conventions across the codebase, improving readability and maintainability. --- app/modules/db/roxy.py | 2 +- app/modules/roxywi/roxy.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/modules/db/roxy.py b/app/modules/db/roxy.py index f23f71ff..15023a74 100644 --- a/app/modules/db/roxy.py +++ b/app/modules/db/roxy.py @@ -33,7 +33,7 @@ def get_user() -> UserName: print(str(e)) -def get_user_status() -> int: +def select_user_status() -> int: try: return UserName.get().Status except Exception: diff --git a/app/modules/roxywi/roxy.py b/app/modules/roxywi/roxy.py index f1b5f04a..9bb850ec 100644 --- a/app/modules/roxywi/roxy.py +++ b/app/modules/roxywi/roxy.py @@ -101,7 +101,7 @@ def action_service(action: str, service: str) -> str: 'restart': 'restart', } cmd = f"sudo systemctl {actions[action]} {service}" - if not roxy_sql.get_user_status(): + if not roxy_sql.select_user_status(): return 'warning: The service is disabled because you are not subscribed. Read here about subscriptions' if is_in_docker: