27 lines
656 B
Python
27 lines
656 B
Python
|
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"}},
|
||
|
)
|