2
This commit is contained in:
2
run.py
2
run.py
@@ -9,7 +9,7 @@ def start(log_level:str):
|
|||||||
"server.backend.endpoints.endpoints:api",
|
"server.backend.endpoints.endpoints:api",
|
||||||
host="0.0.0.0",
|
host="0.0.0.0",
|
||||||
port=settings.PORT,
|
port=settings.PORT,
|
||||||
reload=True,
|
reload=False,
|
||||||
log_level=log_level,
|
log_level=log_level,
|
||||||
access_log=True
|
access_log=True
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials
|
|||||||
import server.backend.schema.pydantic as pydantic
|
import server.backend.schema.pydantic as pydantic
|
||||||
import server.backend.database.db as db
|
import server.backend.database.db as db
|
||||||
from server.backend.auth.JWT import signJWT, decodeJWT
|
from server.backend.auth.JWT import signJWT, decodeJWT
|
||||||
api = FastAPI()
|
api = FastAPI(openapi_url="/api/openapi.json")
|
||||||
security = HTTPBearer()
|
security = HTTPBearer()
|
||||||
|
|
||||||
async def get_current_user(credentials: HTTPAuthorizationCredentials = Depends(security)):
|
async def get_current_user(credentials: HTTPAuthorizationCredentials = Depends(security)):
|
||||||
|
|||||||
Reference in New Issue
Block a user