Currently, the admin CLI commands in supernote/cli/admin.py pass the url parameter around through several function calls (e.g., list_users_async, add_user_async, reset_password_async, queue_status_async, etc.) to support the global --url override flag.
This leads to unnecessary boilerplate and verbose function signatures. We should clean this up and simplify the codebase, perhaps by:
- Managing the active URL context globally or storing it in a config/session context.
- Modifying the
create_session context manager / load_cached_auth helper to automatically retrieve the active override URL from the argparse execution context so subcommands don't need to explicitly accept and pass the url parameter down.
Currently, the admin CLI commands in
supernote/cli/admin.pypass theurlparameter around through several function calls (e.g.,list_users_async,add_user_async,reset_password_async,queue_status_async, etc.) to support the global--urloverride flag.This leads to unnecessary boilerplate and verbose function signatures. We should clean this up and simplify the codebase, perhaps by:
create_sessioncontext manager /load_cached_authhelper to automatically retrieve the active override URL from the argparse execution context so subcommands don't need to explicitly accept and pass theurlparameter down.