diff --git a/utils/scripts.py b/utils/scripts.py index 681873e..29bba52 100644 --- a/utils/scripts.py +++ b/utils/scripts.py @@ -40,7 +40,7 @@ async def db_startup(): def create_secret(): return secrets.token_hex(32) -async def create_user(): +async def create_user_script_async(): async with SessionLocal() as session: username = input("Enter username: ").strip() @@ -70,5 +70,5 @@ async def create_user(): print(f"> User '{username}' with role '{role.value}' created successfully.") print(f"> API Key: {api_key}") -if __name__ == "__main__": - asyncio.run(create_user()) +def create_user_script_sync(): + asyncio.run(create_user_script_async())