accujuris-api / debug_users.py
arnavam's picture
Initial HuggingFace deployment
cd3078d
raw
history blame contribute delete
402 Bytes
from app.database import connect_db, close_db, get_db
import asyncio
async def check_users():
await connect_db()
db = get_db()
users = await db.users.find({}).to_list(length=100)
print(f"Found {len(users)} users:")
for user in users:
print(f"- {user.get('email')} (Role: {user.get('role')})")
await close_db()
if __name__ == "__main__":
asyncio.run(check_users())