(admin: Admin, password: str)
| 15 | |
| 16 | |
| 17 | async def login_admin(admin: Admin, password: str): |
| 18 | # 1. check password |
| 19 | if _verify_password(password, admin.salt, admin.password_hash): |
| 20 | admin = await refresh_admin_token(admin) |
| 21 | else: |
| 22 | raise_http_error(ErrorCode.INCORRECT_PASSWORD, message="Password is incorrect.") |
| 23 | |
| 24 | return admin |
nothing calls this directly
no test coverage detected