Spaces:
3SCError404
/
Paused

nexus / scratch /reset_admin.py
dushyantsingh0
backend stabilization
4405ca9
Raw History Blame Contribute Delete
543 Bytes
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())