diff --git a/README.md b/README.md index 1952dda..2868c9b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ # pzx-web-api +[![Build Status](https://drone.bearcatlog.com/api/badges/Bryant/pzx-web-api/status.svg)](https://drone.bearcatlog.com/Bryant/pzx-web-api) + pzx 专属的 web api 服务 diff --git a/app/api/v1/auth.py b/app/api/v1/auth.py index 94485ce..0eabd7b 100644 --- a/app/api/v1/auth.py +++ b/app/api/v1/auth.py @@ -9,9 +9,9 @@ auth = APIBlueprint('auth', __name__) @auth.post('/wechat_login') @auth.input(WechatLoginIn) @auth.output(WechatLoginOut) -def wechat_login(data): +def wechat_login(json_data): try: - result = rpc.admin.wechat_login(data['code']) + result = rpc.admin.wechat_login(json_data['code']) except Exception as e: raise e return result @@ -20,6 +20,6 @@ def wechat_login(data): @auth.get('/refresh_token') @auth.input(RefreshTokenIn, location='query') @auth.output(RefreshTokenOut) -def refresh_token(data): - result = rpc.admin.refresh_token(data['refresh_token']) +def refresh_token(query_data): + result = rpc.admin.refresh_token(query_data['refresh_token']) return result \ No newline at end of file