Spaces:
Paused
Paused
File size: 543 Bytes
3143c25 4405ca9 3143c25 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
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())
|