mirror of https://github.com/Aidaho12/haproxy-wi
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.pull/401/head
parent
61ed3e92c3
commit
3d642a61c4
|
@ -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:
|
||||
|
|
|
@ -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 <a href="https://roxy-wi.org/pricing" ' \
|
||||
'title="Roxy-WI pricing" target="_blank">here</a> about subscriptions'
|
||||
if is_in_docker:
|
||||
|
|
Loading…
Reference in New Issue