Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /layinded_swx /scripts /reset_admin_password.py
| import asyncio | |
| from swx_core.database.db import AsyncSessionLocal | |
| from swx_core.models.admin_user import AdminUser | |
| from swx_core.security.password_security import get_password_hash | |
| from sqlmodel import select | |
| async def reset(): | |
| async with AsyncSessionLocal() as session: | |
| admin = (await session.execute(select(AdminUser))).scalar_one_or_none() | |
| if admin: | |
| admin.hashed_password = await get_password_hash('securepassword') | |
| session.add(admin) | |
| await session.commit() | |
| print('Password reset done') | |
| if __name__ == "__main__": | |
| asyncio.run(reset()) | |
Xet Storage Details
- Size:
- 612 Bytes
- Xet hash:
- d7955ac62e82258bb458f154350ae4726307c069137f3348acb560d80719daf8
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.