fix: bug
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
BryantHe 2023-08-11 16:55:29 +08:00
parent 95ccf2865d
commit d4a5735d57
2 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,6 @@
# pzx-web-api # 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 服务 pzx 专属的 web api 服务

View File

@ -9,9 +9,9 @@ auth = APIBlueprint('auth', __name__)
@auth.post('/wechat_login') @auth.post('/wechat_login')
@auth.input(WechatLoginIn) @auth.input(WechatLoginIn)
@auth.output(WechatLoginOut) @auth.output(WechatLoginOut)
def wechat_login(data): def wechat_login(json_data):
try: try:
result = rpc.admin.wechat_login(data['code']) result = rpc.admin.wechat_login(json_data['code'])
except Exception as e: except Exception as e:
raise e raise e
return result return result
@ -20,6 +20,6 @@ def wechat_login(data):
@auth.get('/refresh_token') @auth.get('/refresh_token')
@auth.input(RefreshTokenIn, location='query') @auth.input(RefreshTokenIn, location='query')
@auth.output(RefreshTokenOut) @auth.output(RefreshTokenOut)
def refresh_token(data): def refresh_token(query_data):
result = rpc.admin.refresh_token(data['refresh_token']) result = rpc.admin.refresh_token(query_data['refresh_token'])
return result return result