diff --git a/.gitignore b/.gitignore index e69de29..551933d 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,6 @@ +.venv/ +dist/ +privatestudio/_version.py +*.egg-info/ + +storage/ \ No newline at end of file diff --git a/privatestudio/web/__pycache__/auth.cpython-313.pyc b/privatestudio/web/__pycache__/auth.cpython-313.pyc index 44c55b8..73db91b 100644 Binary files a/privatestudio/web/__pycache__/auth.cpython-313.pyc and b/privatestudio/web/__pycache__/auth.cpython-313.pyc differ diff --git a/privatestudio/web/cli.py b/privatestudio/web/cli.py index 21b4157..0748fe8 100644 --- a/privatestudio/web/cli.py +++ b/privatestudio/web/cli.py @@ -31,8 +31,8 @@ def create_key_command(args): """Create an API key for a user.""" db = SessionLocal() try: - plain_key, api_key = create_api_key(db, args.user_id) - print(f"API key created for user {args.user_id}") + plain_key, api_key = create_api_key(db, args.user_name) + print(f"API key created for user {args.user_name}") print(f"Key: {plain_key}") print(f"Keep this key safe - you won't be able to see it again!") except ValueError as e: @@ -79,7 +79,7 @@ def main(): # Create key command key_parser = subparsers.add_parser("create-key", help="Create an API key for a user") - key_parser.add_argument("user_id", type=int, help="User ID") + key_parser.add_argument("user_name", type=str, help="User name") key_parser.set_defaults(func=create_key_command) # Serve command