Skip to content

Commit

Permalink
fix(login): 增加是否配置高德地图Key判断
Browse files Browse the repository at this point in the history
之前没有校验这一步,导致后面请求会失败,报错不明显

BREAKING CHANGE: 如果没有配置,直接raise
  • Loading branch information
397179459 committed Aug 18, 2023
1 parent aa010e4 commit 9dc7995
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions process.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@

# 这里用的高德api,需要自己去高德开发者平台申请自己的key
AMAP_KEY = os.environ.get("GAODE_KEY")
# 增加校验高德api是否配置
if AMAP_KEY is None:
logging.error("请自行配置高德地图的MapKey")
raise ValueError

CURRENT_TIME = str(int(time.time() * 1000))
headers = {}
Expand Down

0 comments on commit 9dc7995

Please sign in to comment.