Skip to content

Commit

Permalink
fix: fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
albertandking committed Mar 31, 2024
1 parent c8f6a40 commit 6b7375c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aktools/core/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def root(
eval_str = decode_params.replace("&", '", ').replace("=", '="') + '"'
if not bool(request.query_params):
try:
received_df = eval("ak." + item_id + f"()")
received_df = eval("ak." + item_id + "()")
if received_df is None:
return JSONResponse(
status_code=status.HTTP_404_NOT_FOUND,
Expand Down Expand Up @@ -138,7 +138,7 @@ def root(request: Request, item_id: str):
eval_str = eval_str.replace("+", " ") # 处理传递的参数中带空格的情况
if not bool(request.query_params):
try:
received_df = eval("ak." + item_id + f"()")
received_df = eval("ak." + item_id + "()")
if received_df is None:
logger.info("该接口返回数据为空,请确认参数是否正确:https://akshare.akfamily.xyz")
return JSONResponse(
Expand All @@ -161,7 +161,7 @@ def root(request: Request, item_id: str):
try:
received_df = eval("ak." + item_id + f"({eval_str})")
if received_df is None:
logger.info(f"该接口返回数据为空,请确认参数是否正确:https://akshare.akfamily.xyz")
logger.info("该接口返回数据为空,请确认参数是否正确:https://akshare.akfamily.xyz")
return JSONResponse(
status_code=status.HTTP_404_NOT_FOUND,
content={"error": "该接口返回数据为空,请确认参数是否正确:https://akshare.akfamily.xyz"},
Expand Down

0 comments on commit 6b7375c

Please sign in to comment.