import asyncio from core.database import async_session_factory from sqlalchemy import update from models.user import User from core.security import get_password_hash async def reset_admin(): async with async_session_factory() as db: await db.execute( update(User) .where(User.email == "admin@3sc.com") .values(hashed_password=get_password_hash("Admin@3sc")) ) await db.commit() print("Password reset successful.") if __name__ == "__main__": asyncio.run(reset_admin())