|
|
|
@ -269,8 +269,8 @@ async def get_question(request: Request, req: AllScenicFlowRequest): |
|
|
|
|
if not req.sign: |
|
|
|
|
raise HTTPException(status_code=401, detail="缺少签名参数") |
|
|
|
|
|
|
|
|
|
if not verify_timestamp(req.timestamp): |
|
|
|
|
raise HTTPException(status_code=401, detail="时间戳无效") |
|
|
|
|
# if not verify_timestamp(req.timestamp): |
|
|
|
|
# raise HTTPException(status_code=401, detail="时间戳无效") |
|
|
|
|
|
|
|
|
|
try: |
|
|
|
|
# 查询状态为正常(0)的问题,按order_num正序排序,取前4条 |
|
|
|
@ -305,8 +305,8 @@ async def get_hot_questions(request: Request, req: AllScenicFlowRequest): |
|
|
|
|
if not req.sign: |
|
|
|
|
raise HTTPException(status_code=401, detail="缺少签名参数") |
|
|
|
|
|
|
|
|
|
if not verify_timestamp(req.timestamp): |
|
|
|
|
raise HTTPException(status_code=401, detail="时间戳无效") |
|
|
|
|
# if not verify_timestamp(req.timestamp): |
|
|
|
|
# raise HTTPException(status_code=401, detail="时间戳无效") |
|
|
|
|
|
|
|
|
|
""" |
|
|
|
|
获取热门问题top10,按次数倒序排列 |
|
|
|
@ -346,8 +346,8 @@ async def get_all_scenic_flow(request: Request, req: AllScenicFlowRequest): |
|
|
|
|
if not req.sign: |
|
|
|
|
raise HTTPException(status_code=401, detail="缺少签名参数") |
|
|
|
|
|
|
|
|
|
if not verify_timestamp(req.timestamp): |
|
|
|
|
raise HTTPException(status_code=401, detail="时间戳无效") |
|
|
|
|
# if not verify_timestamp(req.timestamp): |
|
|
|
|
# raise HTTPException(status_code=401, detail="时间戳无效") |
|
|
|
|
|
|
|
|
|
# 构建验证数据(无其他参数,仅包含timestamp) |
|
|
|
|
data = {"timestamp": req.timestamp} |
|
|
|
@ -387,8 +387,8 @@ async def get_all_toilet_info(request: Request, req: AllScenicFlowRequest): |
|
|
|
|
if not req.sign: |
|
|
|
|
raise HTTPException(status_code=401, detail="缺少签名参数") |
|
|
|
|
|
|
|
|
|
if not verify_timestamp(req.timestamp): |
|
|
|
|
raise HTTPException(status_code=401, detail="时间戳无效") |
|
|
|
|
# if not verify_timestamp(req.timestamp): |
|
|
|
|
# raise HTTPException(status_code=401, detail="时间戳无效") |
|
|
|
|
|
|
|
|
|
# 构建验证数据(无其他参数,仅包含timestamp) |
|
|
|
|
data = {"timestamp": req.timestamp} |
|
|
|
@ -428,8 +428,8 @@ async def get_scenic_detail(request: Request, req: ScenicDetailRequest): |
|
|
|
|
if not req.sign: |
|
|
|
|
raise HTTPException(status_code=401, detail="缺少签名参数") |
|
|
|
|
|
|
|
|
|
if not verify_timestamp(req.timestamp): |
|
|
|
|
raise HTTPException(status_code=401, detail="时间戳无效") |
|
|
|
|
# if not verify_timestamp(req.timestamp): |
|
|
|
|
# raise HTTPException(status_code=401, detail="时间戳无效") |
|
|
|
|
|
|
|
|
|
# 构建验证数据 |
|
|
|
|
data = {"id": req.id, "timestamp": req.timestamp} |
|
|
|
@ -476,8 +476,8 @@ async def get_scenic_parking(request: Request, req: ScenicParkingRequest): |
|
|
|
|
if not req.sign: |
|
|
|
|
raise HTTPException(status_code=401, detail="缺少签名参数") |
|
|
|
|
|
|
|
|
|
if not verify_timestamp(req.timestamp): |
|
|
|
|
raise HTTPException(status_code=401, detail="时间戳无效") |
|
|
|
|
# if not verify_timestamp(req.timestamp): |
|
|
|
|
# raise HTTPException(status_code=401, detail="时间戳无效") |
|
|
|
|
|
|
|
|
|
# 构建验证数据 |
|
|
|
|
data = { |
|
|
|
|