auto-commit for 01035626-fc86-4553-b85b-3396ef438dce

This commit is contained in:
emergent-agent-e1
2026-05-06 04:10:43 +00:00
parent 0f89cba316
commit cbc00fa39c
103 changed files with 9779 additions and 0 deletions
@@ -0,0 +1,41 @@
import asyncio
from motor.motor_asyncio import AsyncIOMotorClient
from passlib.context import CryptContext
import os
from dotenv import load_dotenv
from pathlib import Path
# Load environment variables
ROOT_DIR = Path(__file__).parent
load_dotenv(ROOT_DIR / '.env')
# Password hashing
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
async def update_admin_password():
# Connect to MongoDB
mongo_url = os.environ['MONGO_URL']
client = AsyncIOMotorClient(mongo_url)
db = client[os.environ['DB_NAME']]
# New password
new_password = "Joker1974!!!"
new_password_hash = pwd_context.hash(new_password)
# Update admin password
result = await db.admin_users.update_one(
{"email": "admin@epictravel.com"},
{"$set": {"password_hash": new_password_hash}}
)
if result.modified_count > 0:
print(f"✓ Admin password updated successfully!")
print(f"✓ Email: admin@epictravel.com")
print(f"✓ New Password: {new_password}")
else:
print("✗ Failed to update password or admin user not found")
client.close()
if __name__ == "__main__":
asyncio.run(update_admin_password())