mirror of
https://github.com/fastapi-admin/fastapi-admin.git
synced 2025-08-14 10:47:30 +08:00
Fix latest tortoise error.
This commit is contained in:
@ -14,7 +14,9 @@ from .factory import app
|
||||
auth_schema = HTTPBearer()
|
||||
|
||||
|
||||
async def jwt_required(request: Request, token: HTTPAuthorizationCredentials = Depends(auth_schema)):
|
||||
async def jwt_required(
|
||||
request: Request, token: HTTPAuthorizationCredentials = Depends(auth_schema)
|
||||
):
|
||||
credentials_exception = HTTPException(HTTP_401_UNAUTHORIZED)
|
||||
try:
|
||||
payload = jwt.decode(token.credentials, app.admin_secret, algorithms=["HS256"])
|
||||
|
Reference in New Issue
Block a user