indexstore/main.py

27 lines
656 B
Python
Raw Normal View History

2022-09-30 15:00:45 +08:00
from fastapi import FastAPI, Header, Depends
from Indicator import indicator
app = FastAPI()
# async def get_token_header(authorization: str = Header(...)):
# """
# 获取Token并验证
# :param authorization:
# :return: openid
# """
# token = authorization.split(' ')[-1] # 获取token
# openid = auth_token(token) # 验证token
# if not openid:
# raise HTTPException(status_code=400, detail="无效Token")
# 游戏相关路由
app.include_router(
indicator.router,
prefix="/indicator_storehouse",
# dependencies=[Depends(get_token_header)],
responses={404: {"description": "Not found"}},
)